[SERVER-33215] Stash txn state when finishing an operation within an ongoing multi-statement txn Created: 09/Feb/18  Updated: 29/Oct/23  Resolved: 08/Mar/18

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.7.3

Type: Task Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Siyuan Zhou
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-33223 Add transaction resource stash for sn... Closed
is depended on by SERVER-32322 Allow doing a single update operation... Closed
Related
is related to SERVER-33477 Update session entry with _id upsert Closed
Backwards Compatibility: Fully Compatible
Sprint: Repl 2018-02-26, Repl 2018-03-12
Participants:

 Comments   
Comment by Siyuan Zhou [ 08/Mar/18 ]

Closing the ticket. The work to consolidate different ways to detect whether we're in transaction is partially covered by SERVER-33551. Will create a new ticket for future work.

Comment by Siyuan Zhou [ 02/Mar/18 ]

Most of the work described in this ticket has been done by SERVER-33223. I'm using this ticket to track the clean up work, e.g. clean up the unused opCtx, consolidate different ways to check if we're in a transaction, etc.

Comment by Githook User [ 01/Mar/18 ]

Author:

{'email': 'siyuan.zhou@mongodb.com', 'name': 'Siyuan Zhou', 'username': 'visualzhou'}

Message: SERVER-33215 Remove unused references to opCtx in onCommit callbacks.

This reverts commit d4ae81a7154ab57a266b38d4fe41dd12a3c4540a.
Branch: master
https://github.com/mongodb/mongo/commit/6e3fe522331269bbe57fc5ad9c9881349d2678cc

Comment by Tess Avitabile (Inactive) [ 27/Feb/18 ]

Per discussion with spencer, I put read concern stashing in its own ticket: SERVER-33531.

Comment by Tess Avitabile (Inactive) [ 27/Feb/18 ]

This is also important for writes, so that subsequent writes in the transaction use the correct yield policy for their plan executors (operations with read concern level snapshot will use INTERRUPT_ONLY yield policies).

Comment by Siyuan Zhou [ 27/Feb/18 ]

tess.avitabile, no, that's not in my plan since this work focuses on writes.

Comment by Tess Avitabile (Inactive) [ 27/Feb/18 ]

As part of this work, are you going to stash and unstash the readConcern for the transaction?

Comment by Githook User [ 27/Feb/18 ]

Author:

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

Message: Revert "SERVER-33215 Remove references to opCtx in onCommit callbacks."

This reverts commit d6c49820b590d23b7d09ef4d8aba2218a7181dd2.
Branch: master
https://github.com/mongodb/mongo/commit/d4ae81a7154ab57a266b38d4fe41dd12a3c4540a

Comment by Githook User [ 26/Feb/18 ]

Author:

{'email': 'siyuan.zhou@mongodb.com', 'name': 'Siyuan Zhou', 'username': 'visualzhou'}

Message: SERVER-33215 Remove references to opCtx in onCommit callbacks.

WriteUnitOfWork in multi-statement transactions will call onCommit on
commitTransaction command where references to opCtx of previous commands
are no longer valid.
Branch: master
https://github.com/mongodb/mongo/commit/d6c49820b590d23b7d09ef4d8aba2218a7181dd2

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