JiangSOBD commented on PR #11619:
URL: https://github.com/apache/rocketmq/pull/11619#issuecomment-7168999820
I inspected the current code path. The rejection is local to a single
doTruncate invocation, and the current tests bypass HAClientReader, so the
detected inconsistency is neither retained across reconnects nor persisted
across restarts. I have not yet run the two-store end-to-end scenarios.
To keep this PR store-side, I propose the following scope:
1. Persist a fail-closed inconsistency marker when a proposed truncation is
below the local confirmOffset.
2. Keep rejecting later handshakes, including after a slave restart, until
the history is explicitly recovered or the replica is rebuilt.
3. Add an explicit, default-off and preferably one-shot recovery
authorization tied to the expected master history and truncation offset.
The authorization will be withdrawn after the authorized truncation
succeeds.
4. Add handshake-path regression tests covering the first refusal,
same-epoch replacement writes, reconnect, slave restart, default refusal,
explicitly authorized recovery, and message-content consistency.
Would this store-side scope be acceptable for this PR, or would you prefer
the fix to move to controller-side fencing/epoch handling?
--
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]