echooymxq commented on issue #5209:
URL: https://github.com/apache/rocketmq/issues/5209#issuecomment-1262383261

   
   
   
   > Hi @lanlanbaby, it will not truncate the slave's commitLog between 
confirmOffset to maxOffset before the slave changing to master. First, the 
transfer of confirmOffset is delayed, if the commitLog between confirmOffset to 
maxOffset is truncated, messages may be lost. In addition, we only guarantee 
that messages will not be lost. Messages between confirmOffset to maxOffset are 
uncertain (no ack to clients), so it doesn't matter if these messages exist.
   
   @RongtongJin , There should compute confirmOffset first and truncate invalid 
message? because the current dispatch behind data is reputFromOffset to 
confirmOffset, Maybe we should compute confirmOffset to maxOffset? Not sure if 
I'm right about this.
   
https://github.com/apache/rocketmq/blob/368d12516d102fa0161e2f2c4248c73d2d221024/store/src/main/java/org/apache/rocketmq/store/ha/autoswitch/AutoSwitchHAService.java#L114-L117


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