Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion query/src/main/java/tech/ydb/query/impl/SessionPool.java
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public void destroy() {

@Override
public void close() {
logger.trace("QuerySession[{}] closed with broke status {}", getId(), isBroken);
logger.trace("QuerySession[{}] closed with broken status {}", getId(), isBroken);

stats.released.increment();
if (isBroken || isStopped) {
Expand Down Expand Up @@ -328,6 +328,7 @@ public void run() {
PooledQuerySession session = coldIterator.next();
if (!session.getLastActive().isAfter(idleToRemove) && queue.getTotalCount() > minSize) {
coldIterator.remove();
logger.debug("QuerySession[{}] was deleted by idle timeout", session.getId());
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions table/src/main/java/tech/ydb/table/impl/pool/SessionPool.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public SessionPoolStats stats() {
}

public CompletableFuture<Result<Session>> acquire(Duration timeout) {
logger.debug("acquire session with timeout {}", timeout);
logger.trace("acquire session with timeout {}", timeout);

CompletableFuture<Result<Session>> future = new CompletableFuture<>();

Expand Down Expand Up @@ -131,7 +131,7 @@ private boolean pollNext(CompletableFuture<Result<Session>> future) {

private boolean validateSession(ClosableSession session, CompletableFuture<Result<Session>> future) {
if (session.state().switchToActive(clock.instant())) {
logger.debug("session {} accepted", session.getId());
logger.trace("session {} accepted", session.getId());
if (future.complete(Result.success(session))) {
stats.acquired.increment();
} else {
Expand Down Expand Up @@ -261,6 +261,7 @@ public void run() {

if (!state.lastActive().isAfter(idleToRemove) && queue.getTotalCount() > minSize) {
coldIterator.remove();
logger.debug("session {} was deleted by idle timeout", session.getId());
continue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ private State updated(Instant now, Throwable th, StatusCode code, boolean shutdo

// and if we found it state switch to broken status
if (broken) {
logger.debug("{} broken by status code {}", this, code);
return new State(Status.BROKEN, lastActive, now);
}

Expand All @@ -125,6 +126,7 @@ private State updated(Instant now, Throwable th, StatusCode code, boolean shutdo

if (status == Status.ACTIVE) {
if (shutdownHint) {
logger.debug("{} broken by shutdown hint", this);
Comment thread
pnv1 marked this conversation as resolved.
return new State(Status.NEED_SHUTDOWN, now);
}
return new State(status, now);
Expand Down