This is an automated email from the ASF dual-hosted git repository. lizhimin pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/rocketmq.git
The following commit(s) were added to refs/heads/develop by this push: new 7722ce78ee [ISSUE #9080] Not hold final message store config in fetcher (#9086) 7722ce78ee is described below commit 7722ce78eef7864eb5bcae125b538be980f0569e Author: lizhimins <707364...@qq.com> AuthorDate: Mon Dec 30 15:21:25 2024 +0800 [ISSUE #9080] Not hold final message store config in fetcher (#9086) --- .../apache/rocketmq/tieredstore/core/MessageStoreFetcherImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreFetcherImpl.java b/tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreFetcherImpl.java index e94185626a..bc347bd5b4 100644 --- a/tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreFetcherImpl.java +++ b/tieredstore/src/main/java/org/apache/rocketmq/tieredstore/core/MessageStoreFetcherImpl.java @@ -56,7 +56,6 @@ public class MessageStoreFetcherImpl implements MessageStoreFetcher { private final String brokerName; private final MetadataStore metadataStore; private final MessageStoreConfig storeConfig; - private final org.apache.rocketmq.store.config.MessageStoreConfig messageStoreConfig; private final TieredMessageStore messageStore; private final IndexService indexService; private final FlatFileStore flatFileStore; @@ -72,7 +71,6 @@ public class MessageStoreFetcherImpl implements MessageStoreFetcher { FlatFileStore flatFileStore, IndexService indexService) { this.storeConfig = storeConfig; - this.messageStoreConfig = messageStore.getMessageStoreConfig(); this.brokerName = storeConfig.getBrokerName(); this.flatFileStore = flatFileStore; this.messageStore = messageStore; @@ -150,7 +148,8 @@ public class MessageStoreFetcherImpl implements MessageStoreFetcher { if (result.getMessageCount() == maxCount) { break; } - if (result.getBufferTotalSize() >= messageStoreConfig.getMaxTransferBytesOnMessageInMemory()) { + long maxTransferBytes = messageStore.getMessageStoreConfig().getMaxTransferBytesOnMessageInMemory(); + if (result.getBufferTotalSize() >= maxTransferBytes) { break; } }