diff options
author | va-kuznecov <[email protected]> | 2022-11-01 11:17:41 +0300 |
---|---|---|
committer | va-kuznecov <[email protected]> | 2022-11-01 11:17:41 +0300 |
commit | e0d2617a3e3481adb37bc5e6769b3f39d4ef947f (patch) | |
tree | 8262e14abc3ff5488c8615742804f801a40171a9 | |
parent | 1da614bd236ace1d9cd22b47a6cdba1ce5f7fcd3 (diff) |
Fix TTimer usage in SessionActor
-rw-r--r-- | ydb/core/kqp/kqp_session_actor.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/ydb/core/kqp/kqp_session_actor.cpp b/ydb/core/kqp/kqp_session_actor.cpp index a025fb6b4f5..35ac9f6e08b 100644 --- a/ydb/core/kqp/kqp_session_actor.cpp +++ b/ydb/core/kqp/kqp_session_actor.cpp @@ -110,10 +110,6 @@ struct TKqpQueryState { } }; -class TTimer { - -}; - struct TKqpCleanupCtx { ui64 AbortedTransactionsCount = 0; ui64 TransactionsToBeAborted = 0; @@ -567,7 +563,7 @@ public: } // Can reply inside (in case of deferred-only transactions) and become ReadyState - ExecuteOrDefer(); + ExecuteOrDefer(timer); } void AcquirePersistentSnapshot() { @@ -973,7 +969,7 @@ public: return false; } - void ExecuteOrDefer() { + void ExecuteOrDefer(std::optional<NCpuTime::TCpuTimer> timer = {}) { auto& txCtx = *QueryState->TxCtx; bool haveWork = QueryState->PreparedQuery && @@ -1020,6 +1016,7 @@ public: ++QueryState->CurrentTx; } } else { + timer.reset(); ReplySuccess(); } } @@ -1258,7 +1255,7 @@ public: exec->Swap(txResult.MutableStats()); } - ExecuteOrDefer(); + ExecuteOrDefer(timer); } void HandleExecute(TEvKqpExecuter::TEvStreamData::TPtr& ev) { |