Skip to content

Commit fb88021

Browse files
authored
Merge 69333a8 into c8da1b6
2 parents c8da1b6 + 69333a8 commit fb88021

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ydb/core/kqp/rm_service/kqp_rm_service.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,9 +435,11 @@ class TKqpResourceManager : public IKqpResourceManager {
435435
Y_DEBUG_ABORT_UNLESS(Counters->RmMemory->Val() >= 0);
436436
} // with_lock (txBucket.Lock)
437437

438-
with_lock (Lock) {
439-
ScanQueryMemoryResource.Release(releaseScanQueryMemory);
440-
} // with_lock (Lock)
438+
if (releaseScanQueryMemory > 0) {
439+
with_lock (Lock) {
440+
ScanQueryMemoryResource.Release(releaseScanQueryMemory);
441+
} // with_lock (Lock)
442+
}
441443

442444
LOG_AS_D("TxId: " << txId << ", taskId: " << taskId << ". Released resources, "
443445
<< "ScanQueryMemory: " << releaseScanQueryMemory << ", "

0 commit comments

Comments
 (0)