Loading...
Loading...
The mongod service entry point will stash a TransactionParticipant::Participant (effectively a pointer to the transaction state that decorates a Session from the SessionCatalog) and on command errors use it to clean up the transaction. If during the command the Session associated with that participant is yielded and the command is interrupted, the clean up code may run without the session checked out, so it's unsafe to access the participant. This is an existing issue, but before PM-2210, very few operations yielded a session (only certain aggregation stages in a transaction and the logic that waits for an ongoing prepared transaction to complete before starting a transaction with a higher txnNumber). Instead, the clean up code should get the participant via TransactionParticipant::get() to ensure the session is still checked out.
xgen-internal-githook commented on Wed, 4 May 2022 21:48:05 +0000: Author: {'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'} Message: SERVER-66090 Make mongod service entry point resilient to session yielding (cherry picked from commit e63da638a19323b426ef39e819eda14109ef9746) Branch: v6.0 https://github.com/mongodb/mongo/commit/300f2eed08356faeb2fa638da89aac443c9d056b xgen-internal-githook commented on Wed, 4 May 2022 20:00:31 +0000: Author: {'name': 'Jack Mulrow', 'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow'} Message: SERVER-66090 Make mongod service entry point resilient to session yielding Branch: master https://github.com/mongodb/mongo/commit/e63da638a19323b426ef39e819eda14109ef9746
MongoDB Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.