From 27d8375940dfd248bd9c2d00b5a64607653a1504 Mon Sep 17 00:00:00 2001 From: Lei Zhiyuan Date: Sun, 24 Mar 2024 18:58:19 +0800 Subject: [PATCH] [ISSUE #7836] flush_behind_bytes wrong in transientStorePoolEnable not enable --- .../java/org/apache/rocketmq/store/DefaultMessageStore.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java b/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java index cd7940e87d5..97833351d19 100644 --- a/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java +++ b/store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java @@ -1543,7 +1543,11 @@ public long dispatchBehindBytes() { } public long flushBehindBytes() { - return this.commitLog.remainHowManyDataToCommit() + this.commitLog.remainHowManyDataToFlush(); + if (this.messageStoreConfig.isTransientStorePoolEnable()) { + return this.commitLog.remainHowManyDataToCommit() + this.commitLog.remainHowManyDataToFlush(); + } else { + return this.commitLog.remainHowManyDataToFlush(); + } } @Override