Skip to content

Commit bb8971b

Browse files
authored
Use session from pool for ydb debug ping (#26608)
1 parent db3979d commit bb8971b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ydb/public/lib/ydb_cli/commands/ydb_ping.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,12 @@ bool TCommandPing::PingKqpSelect1(NQuery::TQueryClient& client, const TString& q
255255

256256
settings.Syntax(NQuery::ESyntax::YqlV1);
257257

258+
auto sessionResult = client.GetSession(NQuery::TCreateSessionSettings()).GetValueSync();
259+
NStatusHelpers::ThrowOnErrorOrPrintIssues(sessionResult);
260+
auto session = sessionResult.GetSession();
261+
258262
// Execute query without parameters
259-
auto asyncResult = client.StreamExecuteQuery(
263+
auto asyncResult = session.StreamExecuteQuery(
260264
query,
261265
NQuery::TTxControl::NoTx(),
262266
settings

0 commit comments

Comments
 (0)