You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by we...@apache.org on 2026/04/30 03:22:18 UTC

(iotdb) branch master updated (06621d0f045 -> d1f2ee823f9)

This is an automated email from the ASF dual-hosted git repository.

Wei-hao-Li pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


    from 06621d0f045 mon: add diagnose information for MemoryNotEnoughException (#17578)
     add 85ca0d1893d fix allocate of MemoryBlock
     add 1b9d68e0b70 add queryId into account
     add 1cec558dfff modify release
     new d1f2ee823f9 modify release

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../iotdb/db/queryengine/plan/Coordinator.java     |  2 +
 .../commons/memory/AtomicLongMemoryBlock.java      | 63 +++++++++++-----------
 .../iotdb/commons/memory/MemoryBlockTest.java      | 41 ++++++++++++++
 3 files changed, 75 insertions(+), 31 deletions(-)


(iotdb) 01/01: modify release

Posted by we...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

Wei-hao-Li pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit d1f2ee823f9abb5446f4173f1c2c85318d67a55a
Author: Weihao Li <18...@163.com>
AuthorDate: Thu Apr 30 11:22:06 2026 +0800

    modify release
    
    Signed-off-by: Weihao Li <18...@163.com>
---
 .../apache/iotdb/commons/memory/AtomicLongMemoryBlock.java | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/AtomicLongMemoryBlock.java b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/AtomicLongMemoryBlock.java
index 1a7d3c25413..7f144e5d0d6 100644
--- a/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/AtomicLongMemoryBlock.java
+++ b/iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/memory/AtomicLongMemoryBlock.java
@@ -104,15 +104,13 @@ public class AtomicLongMemoryBlock extends IMemoryBlock {
     long next;
     do {
       prev = usedMemoryInBytes.get();
-      if (sizeInByte > prev) {
-        LOGGER.warn(
-            "The memory cost to be released is larger than the memory cost of memory block {}",
-            this);
-        next = 0;
-      } else {
-        next = prev - sizeInByte;
-      }
+      next = sizeInByte > prev ? 0 : prev - sizeInByte;
     } while (!usedMemoryInBytes.compareAndSet(prev, next));
+    if (sizeInByte > prev) {
+      // print log after compareAndSet was success
+      LOGGER.warn(
+          "The memory cost to be released is larger than the memory cost of memory block {}", this);
+    }
     return next;
   }