You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/12/20 12:22:03 UTC

[GitHub] [rocketmq] MatrixHB edited a comment on issue #3661: Why only the last few files are synchronized when the master-slave synchronization gap is large

MatrixHB edited a comment on issue #3661:
URL: https://github.com/apache/rocketmq/issues/3661#issuecomment-997875813


   look at org.apache.rocketmq.store.ha.HAService.HAClient#dispatchReadRequest
   ```
   // 读取slave本地的最大偏移量
   long slavePhyOffset = HAService.this.defaultMessageStore.getMaxPhyOffset();
   
   if (slavePhyOffset != 0) {
       // slave最大偏移量应该与master传过来的偏移量相等,保证同步消息连续
       if (slavePhyOffset != masterPhyOffset) {
           log.error("master pushed offset not equal the max phy offset in slave, SLAVE: "
               + slavePhyOffset + " MASTER: " + masterPhyOffset);
           return false;
       }
   }
   ```
   
   this ensures the slave offset should be continuous. Thesituation you describe is unlikely to happen, can you give more details ??


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org