Skip to content

Commit 6446cf3

Browse files
committed
Removed send response on cleanup
1 parent 05d5257 commit 6446cf3

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

ydb/core/kqp/common/events/workload_service.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,19 @@ struct TEvContinueRequest : public NActors::TEventLocal<TEvContinueRequest, TKqp
5151
};
5252

5353
struct TEvCleanupRequest : public NActors::TEventLocal<TEvCleanupRequest, TKqpWorkloadServiceEvents::EvCleanupRequest> {
54-
TEvCleanupRequest(const TString& database, const TString& sessionId, const TString& poolId, TDuration duration, TDuration cpuConsumed, bool sendResponseOnNotFound = true)
54+
TEvCleanupRequest(const TString& database, const TString& sessionId, const TString& poolId, TDuration duration, TDuration cpuConsumed)
5555
: Database(database)
5656
, SessionId(sessionId)
5757
, PoolId(poolId)
5858
, Duration(duration)
5959
, CpuConsumed(cpuConsumed)
60-
, SendResponseOnNotFound(sendResponseOnNotFound)
6160
{}
6261

6362
const TString Database;
6463
const TString SessionId;
6564
const TString PoolId;
6665
const TDuration Duration;
6766
const TDuration CpuConsumed;
68-
bool SendResponseOnNotFound = true;
6967
};
7068

7169
struct TEvCleanupResponse : public NActors::TEventLocal<TEvCleanupResponse, TKqpWorkloadServiceEvents::EvCleanupResponse> {

ydb/core/kqp/workload_service/actors/pool_handlers_acors.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,7 @@ class TPoolHandlerActorBase : public TActor<TDerived> {
218218
const TActorId& workerActorId = ev->Sender;
219219

220220
TRequest* request = GetRequestSafe(sessionId);
221-
if (!request) {
222-
if (ev->Get()->SendResponseOnNotFound) {
223-
this->Send(workerActorId, new TEvCleanupResponse(Ydb::StatusIds::SUCCESS));
224-
}
225-
return;
226-
}
227-
if (request->State == TRequest::EState::Canceling) {
221+
if (!request || request->State == TRequest::EState::Canceling) {
228222
this->Send(workerActorId, new TEvCleanupResponse(Ydb::StatusIds::SUCCESS));
229223
return;
230224
}

ydb/core/kqp/workload_service/kqp_workload_service_impl.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,10 @@ struct TPoolState {
161161
}
162162

163163
void DoCleanupRequest(TEvCleanupRequest::TPtr event) {
164-
event->Get()->SendResponseOnNotFound = false;
165164
for (const auto& poolHandler : PreviousPoolHandlers) {
166165
ActorContext.Send(poolHandler, new TEvCleanupRequest(
167166
event->Get()->Database, event->Get()->SessionId, event->Get()->PoolId,
168-
event->Get()->Duration, event->Get()->CpuConsumed, event->Get()->SendResponseOnNotFound
167+
event->Get()->Duration, event->Get()->CpuConsumed
169168
));
170169
}
171170
ActorContext.Send(event->Forward(PoolHandler));

0 commit comments

Comments
 (0)