Skip to content

Commit a981125

Browse files
committed
Open access to QueryClient pool stats
1 parent fef5bde commit a981125

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

query/src/main/java/tech/ydb/query/impl/QueryClientImpl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import tech.ydb.core.grpc.GrpcTransport;
1212
import tech.ydb.query.QueryClient;
1313
import tech.ydb.query.QuerySession;
14+
import tech.ydb.table.SessionPoolStats;
1415

1516
/**
1617
*
@@ -46,8 +47,8 @@ public void updatePoolMaxSize(int maxSize) {
4647
pool.updateMaxSize(maxSize);
4748
}
4849

49-
SessionPool getSessionPool() {
50-
return pool;
50+
public SessionPoolStats getSessionPoolStats() {
51+
return pool.getStats();
5152
}
5253

5354
@Override

query/src/main/java/tech/ydb/query/impl/SessionPool.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ public void destroy() {
250250

251251
@Override
252252
public void close() {
253+
logger.trace("QuerySession[{}] closed with broke status {}", getId(), isBroken);
254+
253255
stats.released.increment();
254256
if (isBroken || isStopped) {
255257
queue.delete(this);

query/src/main/java/tech/ydb/query/impl/TableClientImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public ScheduledExecutorService getScheduler() {
4949

5050
@Override
5151
public SessionPoolStats sessionPoolStats() {
52-
return proxy.getSessionPool().getStats();
52+
return proxy.getSessionPoolStats();
5353
}
5454

5555
@Override

0 commit comments

Comments
 (0)