frotmo commented on PR #11617:
URL: https://github.com/apache/rocketmq/pull/11617#issuecomment-7190798090

   Thanks for the careful read — you're right, and that's exactly the gap in 
the current patch. The guard is evaluated per handshake and keeps no state, so 
once the master grows past 3280 the consistent point becomes 3280, the guard 
passes, and the slave resumes replication while retaining its old `[1580, 
3280)`. The replicas can end up with equal max offsets but different message 
histories, and nothing compares contents. This is the P1 raised in 
@ShannonDing's review above.
   
   We're consolidating this work with #11619 — see 
https://github.com/apache/rocketmq/pull/11619#issuecomment-7179953239 and 
https://github.com/apache/rocketmq/pull/11619#issuecomment-7180327702. The plan 
is to make the refusal sticky: persist a fail-closed marker when a truncation 
below `confirmOffset` is detected, keep rejecting later handshakes (including 
after a slave restart) until an explicit one-shot recovery authorization is 
used (bound to the expected master history and truncation offset), or the 
replica is rebuilt. I'll close this PR once we've aligned, so the discussion 
can continue there.
   
   Thanks for flagging it — this is a good question.


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