Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MB-35053: Extend allowedDuplicatePrepareSeqnos to highSeqno
When reconnecting, we can see duplicate prepares (when the intervening commit has been deduped) *after* the hps, which were not previously accepted by the PassiveDM. This is because the HPS is dependent on persistence; PersistToMajority prepares "hold up" the HPS until they have been persisted. BUT, we can still receive a duplicate for the PersistToMaajority even if it has not been persisted. 1 2 3 4 5 6 7 8 PRE(a) PRE(b, l=PersistToMaj) CMT(a) CMT(b) PRE(a) PRE(b) CMT(a) CMT(b) If the replica received the following (but hasn't persisted anything yet) PRE(a) PRE(b, l=PersistToMaj) ^ | HPS = 1 then disconnected, and reconnected and saw PRE(a) PRE(b) CMT(a) CMT(b) The replica has then seen a duplicate prepare that needs to replace the prepare with seqno 2 - and 2 > HPS. Therefore, the replica should permit duplicate prepares for any seqno meeting the following: HighCompletedSeqno < seqno <= highSeqno No prepare prior to the HCS should be replaced, because they have been completed - we have received a commit/abort for them. Prepares with seqno > highSeqno are in the "future" - they were received after the snapshot marker, and are not expected to be duped. Change-Id: I32ff808b0538f245ba9fcf45859ab186e5854de6 Reviewed-on: http://review.couchbase.org/112054 Reviewed-by: Dave Rigby <daver@couchbase.com> Tested-by: Build Bot <build@couchbase.com>
- Loading branch information
Showing
3 changed files
with
38 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters