diff options
author | Filitov Mikhail <filitovme@gmail.com> | 2024-12-25 15:07:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-25 15:07:36 +0100 |
commit | dfda963d7c7cb23081af099ca3312689902e05f2 (patch) | |
tree | 7fc2f75def3696f644cd376a5ec9d251232cb340 | |
parent | 2edc9b5e6d5b07f320692cfe212e04f6e49f5ec5 (diff) | |
download | ydb-dfda963d7c7cb23081af099ca3312689902e05f2.tar.gz |
Log last failed memory allocation instead of max (#12981)
-rw-r--r-- | ydb/core/kqp/rm_service/kqp_rm_service.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ydb/core/kqp/rm_service/kqp_rm_service.h b/ydb/core/kqp/rm_service/kqp_rm_service.h index c8f7d9558c..bba6426b8a 100644 --- a/ydb/core/kqp/rm_service/kqp_rm_service.h +++ b/ydb/core/kqp/rm_service/kqp_rm_service.h @@ -163,7 +163,7 @@ public: res << ", tx initially granted memory: " << HumanReadableSize(TxExternalDataQueryMemory.load(), SF_BYTES) << ", tx total memory allocations: " << HumanReadableSize(TxScanQueryMemory.load(), SF_BYTES) << ", tx largest successful memory allocation: " << HumanReadableSize(TxMaxAllocation.load(), SF_BYTES) - << ", tx largest failed memory allocation: " << HumanReadableSize(TxFailedAllocation.load(), SF_BYTES) + << ", tx last failed memory allocation: " << HumanReadableSize(TxFailedAllocation.load(), SF_BYTES) << ", tx total execution units: " << TxExecutionUnits.load() << ", started at: " << CreatedAt << " }" << Endl; @@ -184,11 +184,11 @@ public: void AckFailedMemoryAlloc(ui64 memory) { auto* oldBacktrace = TxFailedAllocationBacktrace.load(); - ui64 maxAlloc = TxFailedAllocation.load(); + ui64 lastAlloc = TxFailedAllocation.load(); bool exchanged = false; - while(maxAlloc < memory && !exchanged) { - exchanged = TxFailedAllocation.compare_exchange_weak(maxAlloc, memory); + while(!exchanged) { + exchanged = TxFailedAllocation.compare_exchange_weak(lastAlloc, memory); } if (exchanged) { |