Skip to content

Commit 7b32fb9

Browse files
committed
Fixed forget operation
1 parent 7505808 commit 7b32fb9

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

ydb/core/kqp/proxy_service/kqp_script_executions.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,8 @@ class TCheckLeaseStatusActor : public TCheckLeaseStatusActorBase {
883883
};
884884

885885
class TForgetScriptExecutionOperationQueryActor : public TQueryBase {
886-
static constexpr i64 MAX_NUMBER_ROWS_IN_BATCH = 10000;
886+
static constexpr i64 MAX_NUMBER_ROWS_IN_BATCH = 100000;
887+
static constexpr TDuration MINIMAL_DEADLINE_TIME = TDuration::Seconds(1);
887888

888889
struct TResultSetDescription {
889890
i64 MaxRowId;
@@ -894,7 +895,7 @@ class TForgetScriptExecutionOperationQueryActor : public TQueryBase {
894895
TForgetScriptExecutionOperationQueryActor(const TString& executionId, const TString& database, TInstant operationDeadline)
895896
: ExecutionId(executionId)
896897
, Database(database)
897-
, Deadline(GetDeadline(operationDeadline))
898+
, Deadline(operationDeadline - MINIMAL_DEADLINE_TIME)
898899
{}
899900

900901
void OnRunQuery() override {
@@ -1030,13 +1031,6 @@ class TForgetScriptExecutionOperationQueryActor : public TQueryBase {
10301031
return true;
10311032
}
10321033

1033-
static TInstant GetDeadline(TInstant operationDeadline) {
1034-
if (TInstant::Now() >= operationDeadline) {
1035-
return operationDeadline;
1036-
}
1037-
return TInstant::Now() + (operationDeadline - TInstant::Now()) / 2;
1038-
}
1039-
10401034
private:
10411035
TString ExecutionId;
10421036
TString Database;

0 commit comments

Comments
 (0)