[SERVER-44374] Base cloner must not hold locks when fulfilling promise Created: 01/Nov/19  Updated: 29/Oct/23  Resolved: 04/Nov/19

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

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

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2019-11-04
Participants:
Linked BF Score: 0

 Description   

When a Promise is fulfilled (either by completion or error), the callback may run immediately on the same thread as the Promise owner. This means that no locks may be held when fulfilling a Promise (or the callback must be aware of any locks held, but that's ugly). BaseCloner violates this when setting an error status; the Promise::setError call should be moved out of the lock scope.



 Comments   
Comment by Githook User [ 04/Nov/19 ]

Author:

{'name': 'Matthew Russotto', 'username': 'mtrussotto', 'email': 'matthew.russotto@mongodb.com'}

Message: SERVER-44374 Base cloner must not hold locks when fulfilling promise
Branch: master
https://github.com/mongodb/mongo/commit/3ee34d4b15bb263106427688b7915bb8571eaecd

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