You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ta...@apache.org on 2022/11/10 02:44:53 UTC

[iotdb] branch multi_leader_memory_pendingBatch_control updated: fix wrong memory allocation calculation

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

tanxinyu pushed a commit to branch multi_leader_memory_pendingBatch_control
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/multi_leader_memory_pendingBatch_control by this push:
     new b1ffd8e928 fix wrong memory allocation calculation
b1ffd8e928 is described below

commit b1ffd8e9289c47121ecc932acee8c98f7fb8d8b7
Author: OneSizeFitQuorum <ta...@apache.org>
AuthorDate: Thu Nov 10 10:44:40 2022 +0800

    fix wrong memory allocation calculation
    
    Signed-off-by: OneSizeFitQuorum <ta...@apache.org>
---
 .../consensus/multileader/logdispatcher/MultiLeaderMemoryManager.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/logdispatcher/MultiLeaderMemoryManager.java b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/logdispatcher/MultiLeaderMemoryManager.java
index 296fd1c716..1d0e237bce 100644
--- a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/logdispatcher/MultiLeaderMemoryManager.java
+++ b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/logdispatcher/MultiLeaderMemoryManager.java
@@ -43,7 +43,7 @@ public class MultiLeaderMemoryManager {
         (memorySize) -> {
           long remainSize =
               (fromQueue ? maxMemorySizeForQueueInByte : maxMemorySizeInByte) - memorySize;
-          if (memorySize > remainSize) {
+          if (size > remainSize) {
             logger.debug(
                 "consensus memory limited. required: {}, used: {}, total: {}",
                 size,