summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorva-kuznecov <[email protected]>2022-11-01 12:45:03 +0300
committerva-kuznecov <[email protected]>2022-11-01 12:45:03 +0300
commit14b4b44f929d300374d993b6344b20a86cb5b4c5 (patch)
treef29a995a19ff04539bd511420a06a77a2b9a304b
parente0d2617a3e3481adb37bc5e6769b3f39d4ef947f (diff)
Fix TTimer usage in SessionActor, rev. 2
-rw-r--r--ydb/core/kqp/kqp_session_actor.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/ydb/core/kqp/kqp_session_actor.cpp b/ydb/core/kqp/kqp_session_actor.cpp
index 35ac9f6e08b..4563c09825d 100644
--- a/ydb/core/kqp/kqp_session_actor.cpp
+++ b/ydb/core/kqp/kqp_session_actor.cpp
@@ -263,7 +263,7 @@ public:
return;
}
- bool replied = ExecutePhyTx(/*query*/ nullptr, /*tx*/ nullptr, /*commit*/ true);
+ bool replied = ExecutePhyTx(/*query*/ nullptr, /*tx*/ nullptr, /*commit*/ true, /*timer*/ {});
if (!replied) {
Become(&TKqpSessionActor::ExecuteState);
@@ -1011,7 +1011,7 @@ public:
bool commit = QueryState->Commit && QueryState->CurrentTx >= phyQuery.TransactionsSize() - 1;
if (tx || commit) {
- bool replied = ExecutePhyTx(&phyQuery, std::move(tx), commit);
+ bool replied = ExecutePhyTx(&phyQuery, std::move(tx), commit, timer);
if (!replied) {
++QueryState->CurrentTx;
}
@@ -1021,7 +1021,9 @@ public:
}
}
- bool ExecutePhyTx(const NKqpProto::TKqpPhyQuery* query, std::shared_ptr<const NKqpProto::TKqpPhyTx> tx, bool commit) {
+ bool ExecutePhyTx(const NKqpProto::TKqpPhyQuery* query, std::shared_ptr<const NKqpProto::TKqpPhyTx> tx, bool commit,
+ std::optional<NCpuTime::TCpuTimer> timer)
+ {
auto& txCtx = *QueryState->TxCtx;
auto calcPure = [](const auto& tx) {
@@ -1069,6 +1071,7 @@ public:
YQL_ENSURE(commit);
if (txCtx.DeferredEffects.Empty() && !txCtx.Locks.HasLocks() && !txCtx.TopicOperations.HasOperations()) {
+ timer.reset();
ReplySuccess();
return true;
}