[SERVER-38355] WiredTigerRecoveryUnit::_txnOpen() should abort while commit/rollback handlers are running Created: 02/Dec/18  Updated: 29/Oct/23  Resolved: 04/Dec/18

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 4.1.7

Type: Improvement Priority: Minor - P4
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-38397 make WiredTigerRecoveryUnit::State a ... Closed
is related to SERVER-38069 Plan cache maintenance after rolling ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Storage NYC 2018-12-17
Participants:
Linked BF Score: 45

 Description   

Currently, we hit this invariant in WiredTigerRecoveryUnit if a rollback handler accidentally reopens the transaction. This invariant is triggered after all the rollback handlers have run, making it hard to identify the errant handler. As a rule, commit and rollback handlers should avoid accessing the OperationContext and RecoveryUnit.

It would be useful for debugging to abort at the point where the rollback/commit handler is attempting to reopen the transaction.



 Comments   
Comment by Githook User [ 04/Dec/18 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-38355 add invariant for commit and rollback handlers reopening the WT transaction

The invariant is added to WiredTigerRecoveryUnit::_txnOpen().
This commit also adds WiredTigerRecoveryUnit::State which replaces _active and _inUnitOfWork.
Branch: master
https://github.com/mongodb/mongo/commit/4c5d05f9bb8457a389cb02d43f9d59aabbfec82c

Comment by Githook User [ 04/Dec/18 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-38355 invariant message for reopening WT transaction in recovery unit during commit/rollback
Branch: master
https://github.com/mongodb/mongo/commit/476554eafc1860bdd9996bd4eddb954a9218bdeb

Comment by Githook User [ 04/Dec/18 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com'}

Message: SERVER-38355 remove WiredTigerRecoveryUnit::_areWriteUnitOfWorksBanned

This member variable was last referenced in commit 8257a817bfaf596e68204ad858f811e294d986b5.
Branch: master
https://github.com/mongodb/mongo/commit/74bea0ed6c5ac492b44145d79704f504a351c7e7

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