[SERVER-34773] The `TransactionReaper` handler classes are not exception-safe Created: 01/May/18  Updated: 29/Oct/23  Resolved: 02/May/18

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.6.4, 3.7.9
Fix Version/s: 3.6.6, 4.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6
Sprint: Sharding 2018-05-07
Participants:
Linked BF Score: 45

 Description   

The TransactionReaper handler classes invariant that their finalize() method has been called, but nothing in that method's logic really requires it, nor does the TransactionReaper ensure that in any way.

Because of this, the invariants should be removed.

It is worth leaving the _finalized variables around to invariant that finalize() is only called once, but it doesn't need to be an AtomicBool since it is only used from a single thread.



 Comments   
Comment by Githook User [ 01/Jun/18 ]

Author:

{'username': 'kaloianm', 'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com'}

Message: SERVER-34773 Do not require `finalize()` to be have been called on the TransactionReaper handlers

(cherry picked from commit bfac93c92c75d6d6c85b2b4653e3604b4384632b)
Branch: v3.6
https://github.com/mongodb/mongo/commit/771c301826e071c49484b8100223f2fcc923b04f

Comment by Githook User [ 01/Jun/18 ]

Author:

{'username': 'kaloianm', 'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com'}

Message: SERVER-34773 Use kSessionsNamespaceString instead of its constituent StringData entries

(cherry picked from commit 8200acfe03477cb6311768b3d9609cfb339a7eee)
Branch: v3.6
https://github.com/mongodb/mongo/commit/d130db3272bb991c0b4ad1500a766ac72b4c4e0c

Comment by Jack Mulrow [ 18/May/18 ]

This invariant is still failing in 3.6, so requesting a 3.6 backport.

Comment by Githook User [ 02/May/18 ]

Author:

{'email': 'kaloian.manassiev@mongodb.com', 'name': 'Kaloian Manassiev', 'username': 'kaloianm'}

Message: SERVER-34773 Do not require `finalize()` to be have been called on the TransactionReaper handlers
Branch: master
https://github.com/mongodb/mongo/commit/bfac93c92c75d6d6c85b2b4653e3604b4384632b

Comment by Githook User [ 02/May/18 ]

Author:

{'email': 'kaloian.manassiev@mongodb.com', 'name': 'Kaloian Manassiev', 'username': 'kaloianm'}

Message: SERVER-34773 Use kSessionsNamespaceString instead of its constituent StringData entries
Branch: master
https://github.com/mongodb/mongo/commit/8200acfe03477cb6311768b3d9609cfb339a7eee

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