Details
-
Bug
-
Resolution: Fixed
-
Critical
-
6.5.0
-
Triaged
-
Yes
-
KV-Engine MH Beta part 2, KV-Engine MH 2nd Beta
Description
Follow-up to MB-35060 - rollback of vBuckets containing SyncWrites is currently forced to always rollback to zero.
This needs to be addressed for GA, as that results in loss of replica copies of data during the rollback window.
h2, Problematic Scenarios
Scenario 1: Undo commit, no existing committed
1:PRE(a)
|
--------
|
2:CMT(a)
|
|
Rollback to seqno 1: 1:PRE(a)
|
- Callback(2:CMT(a))
-> preRb=ENOENT, remove Commit from HT.
-> Check if Prepare exists in preRb; if so re-add it (re-added here).
ok
Scenario 2: Undo commit, existing committed
1:SET(a)
|
2:PRE(a)
|
--------
|
3:CMT(a)
|
|
Rollback to seqno 2: 1:SET(a)
|
2:PRE(a)
|
- Callback(3:CMT(a))
-> preRb=SUCCESS, Revert HT to 1:SET
-> Check if Prepare exists in preRb; if so re-add it (re-added here).
ok
Scenario 3: Undo Set & Commit
1:PRE(a)
|
--------
|
2:CMT(a)
|
3:SET(a)
|
|
Rollback to seqno 1: 1:PRE(a)
|
[[ No callback for 2:CMT(a), same key as 3:SET(a) so would de-duped.]]
|
* Callback(3:SET)
|
-> preRb=ENOENT, remove Commit from HT.
|
-> **BUG** Need to check for Prepares for ALL mutations (not just Commit/Abort).
|
Scenario 4: Rollback to old prepare.
1:PRE(a)
|
--------
|
2:CMT(a)
|
3:PRE(a)
|
|
Rollback to seqno 1: 1:PRE(a)
|
|
* Callback(2:CMT(a))
|
-> preRb=ENOENT, remove Commit from HT.
|
-> Check if prepare exists in preRb, if so re-add it (re-added here).
|
* CallbacK(3:PRE(a))
|
-> preRb=SUCCESS, revert HT to 1:PRE(a)
|
**BUG**: Need to support Prepare revert in VB:setFromInternal() (or equiv)
|
Scenario 5: Undo Delete & Set:
1:PRE(a)
|
--------
|
2:CMT(a)
|
3:DEL(a)
|
|
Rollback to seqno 1: 1:PRE(a)
|
[[ No callback for 2:CMT(a), same key as 3:SET(a) so would de-duped.]]
|
* Callback(3:DEL)
|
-> preRb=ENOENT, remove Commit from HT.
|
-> **BUG** Need to check for Prepares for ALL mutations (not just Commit/Abort).
|
*BUG* Unpersisted SyncWrites (see rollbackUnpersistedItems) are not currently handled.
Attachments
Issue Links
- relates to
-
MB-35060 [Durability]: Rollback of SyncWrite-related operations can result in invalid state on replicas [2019/7/19]
- Closed