Skip to content

Commit

Permalink
[ISSUE #9080] Not hold final message store config in fetcher (#9086)
Browse files Browse the repository at this point in the history
  • Loading branch information
lizhimins authored Dec 30, 2024
1 parent 19393e0 commit 7722ce7
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -72,7 +71,6 @@ public MessageStoreFetcherImpl(TieredMessageStore messageStore, MessageStoreConf
FlatFileStore flatFileStore, IndexService indexService) {

this.storeConfig = storeConfig;
this.messageStoreConfig = messageStore.getMessageStoreConfig();
this.brokerName = storeConfig.getBrokerName();
this.flatFileStore = flatFileStore;
this.messageStore = messageStore;
Expand Down Expand Up @@ -150,7 +148,8 @@ protected GetMessageResultExt getMessageFromCache(
if (result.getMessageCount() == maxCount) {
break;
}
if (result.getBufferTotalSize() >= messageStoreConfig.getMaxTransferBytesOnMessageInMemory()) {
long maxTransferBytes = messageStore.getMessageStoreConfig().getMaxTransferBytesOnMessageInMemory();
if (result.getBufferTotalSize() >= maxTransferBytes) {
break;
}
}
Expand Down

0 comments on commit 7722ce7

Please sign in to comment.