[SERVER-82223] Commit handler in FCV op observer is susceptible to interruption Created: 16/Oct/23  Updated: 23/Nov/23  Resolved: 03/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.2.0-rc0, 7.0.5, 6.0.13, 5.0.24

Type: Bug Priority: Major - P3
Reporter: Gregory Noma Assignee: Paolo Polato
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
related to SERVER-82376 FCV opobserver _setVersion must not t... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v7.0, v6.0, v5.0
Sprint: Sharding EMEA 2023-10-30, CAR Team 2023-11-13
Participants:
Linked BF Score: 105

 Description   

When an FCV op observer observes an insert or an update to the admin.system.version collection, it registers a commit handler to set the FCV version. However this logic can throw an exception if it gets interrupted, for instance if a stepdown occurs. In particular, the call to killSessionsAbortUnpreparedTransactions ends up calling OperationContext::waitForConditionOrInterrupt. This is an issue because commit/rollback handlers are not allowed to throw exceptions.



 Comments   
Comment by Githook User [ 23/Nov/23 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-82223 Avoid throwing from a RecoveryUnit while committing a FCV Update

(cherry picked from commit 17b198f47de67398a16d40a6e88e343851ef819b)
(cherry picked from commit 42afbafb2494458f06ea009d4158171244ffb04f)
(cherry picked from commit 7058e552a6536e08357bdd2805732cce8890bc5a)
Branch: v5.0
https://github.com/mongodb/mongo/commit/add28735ad37294a4c2e711df13c7041563ad51f

Comment by Githook User [ 23/Nov/23 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-82223 Avoid throwing from a RecoveryUnit while committing a FCV Update

(cherry picked from commit 17b198f47de67398a16d40a6e88e343851ef819b)
(cherry picked from commit 42afbafb2494458f06ea009d4158171244ffb04f)
Branch: v6.0
https://github.com/mongodb/mongo/commit/082317de4970b892fb703e80a990136d3d9ad817

Comment by Githook User [ 21/Nov/23 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-82223 Avoid throwing from a RecoveryUnit while committing a FCV Update

(cherry picked from commit 17b198f47de67398a16d40a6e88e343851ef819b)
Branch: v7.0
https://github.com/mongodb/mongo/commit/42afbafb2494458f06ea009d4158171244ffb04f

Comment by Githook User [ 02/Nov/23 ]

Author:

{'name': 'Paolo Polato', 'email': 'paolo.polato@mongodb.com', 'username': 'ppolato'}

Message: SERVER-82223 Avoid throwing from a RecoveryUnit while committing a FCV Update
Branch: master
https://github.com/mongodb/mongo/commit/17b198f47de67398a16d40a6e88e343851ef819b

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