[SERVER-54365] Allow ClientOutOfLineExecutor to skip shutdown Created: 05/Feb/21  Updated: 29/Oct/23  Resolved: 22/Mar/21

Status: Closed
Project: Core Server
Component/s: Internal Code
Affects Version/s: None
Fix Version/s: 4.4.5, 5.0.0-rc0

Type: Bug Priority: Major - P3
Reporter: Amirsaman Memaripour Assignee: Amirsaman Memaripour
Resolution: Fixed Votes: 0
Labels: servicearch-wfbf-day
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:
v4.4
Participants:
Linked BF Score: 151

 Description   

Instances of ClientOutOfLineExecutor, which are decorations on Client, must be shutdown before their destructor is invoked (see here). This requirement is satisfied through destructor actions, however, it may terminate the process if an exception is thrown before the newly constructed client is moved to a UniqueClient (see here).

We should change ClientOutOfLineExecutor to skip the invariant before the UniqueClient is constructed. We may do so by skipping the invariant before the first task is scheduled on the executor.

Acceptance criteria: ClientOutOfLineExecutor must only require shutdown before destruction if the new Client is successfully constructed (i.e., and instance of UniqueClient is returned from ServiceContext::makeClient).



 Comments   
Comment by Githook User [ 23/Mar/21 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-54365 Allow ClientOutOfLineExecutor to skip shutdown

(cherry picked from commit 16ce9d71e1aea5a0244ddf0e7d547425b2671b2f)
Branch: v4.4
https://github.com/mongodb/mongo/commit/b9daa666f53eb51adc1db123020f53ef672df0c3

Comment by Githook User [ 22/Mar/21 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-54365 Allow ClientOutOfLineExecutor to skip shutdown
Branch: master
https://github.com/mongodb/mongo/commit/16ce9d71e1aea5a0244ddf0e7d547425b2671b2f

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