RockteMQ-AI commented on code in PR #10947:
URL: https://github.com/apache/rocketmq/pull/10947#discussion_r3817790719


##########
store/src/main/java/org/apache/rocketmq/store/DefaultMessageStore.java:
##########
@@ -2741,16 +2741,19 @@ public void doReput() {
 
                         if (dispatchRequest.isSuccess()) {
                             if (size > 0) {
-                                currentReputTimestamp = 
dispatchRequest.getStoreTimestamp();
-                                
DefaultMessageStore.this.doDispatch(dispatchRequest);
+                                if (dispatchRequest.getMsgSize() > 0) {

Review Comment:
   The msgSize > 0 guard in doReput correctly filters out NOOP entries from 
dispatch. This is important for the DLedger 0.4.x compatibility where NOOP 
entries are used for heartbeats. Good fix.



##########
store/src/main/java/org/apache/rocketmq/store/dledger/DLedgerCommitLog.java:
##########
@@ -69,6 +72,8 @@ public class DLedgerCommitLog extends CommitLog {
     private final DLedgerConfig dLedgerConfig;
     private final DLedgerMmapFileStore dLedgerFileStore;
     private final MmapFileList dLedgerFileList;
+    private volatile long cachedCommittedIndex = Long.MIN_VALUE;

Review Comment:
   The volatile cachedCommittedIndex/cachedCommittedPos fields are a good 
optimization to avoid repeated DLedger state lookups. Consider documenting the 
cache invalidation contract (when these are updated vs when they become stale).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to