imaffe edited a comment on pull request #1851:
URL: https://github.com/apache/rocketmq/pull/1851#issuecomment-631803178


    Curious how duplicationEnabled would affect the ReputMessageService, I 
noticed 
   ```
    private void doReput() {
               if (this.reputFromOffset < 
DefaultMessageStore.this.commitLog.getMinOffset()) {
                   this.reputFromOffset = 
DefaultMessageStore.this.commitLog.getMinOffset();
               }
               for (boolean doNext = true; this.isCommitLogAvailable() && 
doNext; ) {
   
                   if 
(DefaultMessageStore.this.getMessageStoreConfig().isDuplicationEnable()
                       && this.reputFromOffset >= 
DefaultMessageStore.this.getConfirmOffset()) {
                       break;
                   }
   ...
   ```
   
   I'm not quite sure what the confirmOffset means (seems like minimum 
checkpoint timestamp ), but with my understanding about the correct impl of 
commit log recovery, it seems we need to change doReput() as well. 
   
   maybe something like 
   ```
                   if 
(!DefaultMessageStore.this.getMessageStoreConfig().isDuplicationEnable()
                       && this.reputFromOffset < 
DefaultMessageStore.this.getConfirmOffset()) {
                       increase reputFromOffset and continue;
                   }
   ```
   
   Thanks so much and would it would be great if we can document what the 
confirmOffset really means and what should be the desired duplicationEnabled 
semantics.
   
   
   reference: http://zjykzk.github.io/post/cs/rocketmq/store/  消息后续逻辑


----------------------------------------------------------------
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.

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


Reply via email to