You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2023/09/14 11:23:47 UTC

[iotdb] branch rel/1.2 updated: [To rel/1.2] Remove cancelled/done MemoryReservationFuture from the queue when freeing memory

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

jackietien pushed a commit to branch rel/1.2
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/rel/1.2 by this push:
     new 0b58babf027 [To rel/1.2] Remove cancelled/done MemoryReservationFuture from the queue when freeing memory
0b58babf027 is described below

commit 0b58babf0274dbe83beaf17a9932c71e8ce8f53a
Author: Liao Lanyu <14...@qq.com>
AuthorDate: Thu Sep 14 19:23:40 2023 +0800

    [To rel/1.2] Remove cancelled/done MemoryReservationFuture from the queue when freeing memory
---
 .../org/apache/iotdb/db/queryengine/execution/memory/MemoryPool.java     | 1 +
 1 file changed, 1 insertion(+)

diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/memory/MemoryPool.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/memory/MemoryPool.java
index 7aac8447610..936a4cbcb27 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/memory/MemoryPool.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/memory/MemoryPool.java
@@ -334,6 +334,7 @@ public class MemoryPool {
       MemoryReservationFuture<Void> future = iterator.next();
       synchronized (future) {
         if (future.isCancelled() || future.isDone()) {
+          iterator.remove();
           continue;
         }
         long bytesToReserve = future.getBytesToReserve();