...
BugZero found this defect 2776 days ago.
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.
xgen-internal-githook commented on Wed, 12 Jul 2017 19:40:13 +0000: 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