Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yuz10 authored Dec 25, 2024
1 parent eea8264 commit 58940d9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ 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 @@ -71,6 +72,7 @@ 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 @@ -148,7 +150,7 @@ protected GetMessageResultExt getMessageFromCache(
if (result.getMessageCount() == maxCount) {
break;
}
if (result.getBufferTotalSize() >= storeConfig.getReadAheadMessageSizeThreshold()) {
if (result.getBufferTotalSize() >= messageStoreConfig.getMaxTransferBytesOnMessageInMemory()) {
break;
}
}
Expand Down

0 comments on commit 58940d9

Please sign in to comment.