[SERVER-29531] Handle Rollbacks in SessionTransactionTable Created: 09/Jun/17  Updated: 30/Oct/23  Resolved: 24/Jul/17

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.5.10

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Jack Mulrow
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-37811 Replication rollback invalidates all ... Backlog
is related to SERVER-29933 Roll Back to Checkpoint: Notify subsy... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2017-07-10, Sharding 2017-07-31
Participants:

 Description   

There will be special logic required for rollback since updates to the systems.transaction won't have any oplog entries and won't be rolled back to the right state.

This can be resolved by:
Approach1: copying the full table from the sync source as part of the rollback process. This should be done before the minValid opTime is determined and set. Cons: Can be expensive since there can be many documents that needs to be copied over (one doc per statement)
Approach2: Remove the corresponding transaction statement entries from transaction table (both in-memory cache and storage) by inspecting the (sessionId, txnNum and stmtId) of the oplog entry. Cons: Cannot revert state back to older transactions in a session.



 Comments   
Comment by Githook User [ 12/Jul/17 ]

Author:

{u'username': u'jsmulrow', u'name': u'Jack Mulrow', u'email': u'jack.mulrow@mongodb.com'}

Message: SERVER-29531 Handle rollbacks in SessionTransactionTable
Branch: master
https://github.com/mongodb/mongo/commit/32ce928cb3275bb3de7c1e1ccc99d3c1e57cdc72

Generated at Thu Feb 08 04:21:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.