[SERVER-50953] Remove completionFuture from PrimaryOnlyService machinery Created: 15/Sep/20  Updated: 29/Oct/23  Resolved: 23/Sep/20

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

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

Issue Links:
Related
is related to SERVER-50919 Make sure PrimaryOnlyService Instance... Closed
Backwards Compatibility: Fully Compatible
Sprint: Service arch 2020-10-05
Participants:

 Description   

Currently PrimaryOnlyService Instances have an _completionPromise and corresponding future that are managed by the machinery as a convenience to implementations. However we are finding that most PrimaryOnlyService implementations have other Promise/Future pairs that they are managing anyway for intermediary states. This makes the value of having a built-in completion future less, and actually increases the complexity in reasoning about the system since the lifetimes of these promises are managed differently. We should consider taking this functionality out of the PrimaryOnlyService::Instance base class and require derived class implementations to manage their own completion future if they require that functionality.



 Comments   
Comment by Githook User [ 23/Sep/20 ]

Author:

{'name': 'Spencer T Brody', 'email': 'spencer@mongodb.com', 'username': 'stbrody'}

Message: SERVER-50953 Remove completionFuture from PrimaryOnlyService machinery
Branch: master
https://github.com/mongodb/mongo/commit/9d5298612eb9cc6a173cd415712f8c8f0c165e91

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