[SERVER-46742] Factor out logic to wait for config commitment into a separate public method Created: 09/Mar/20  Updated: 29/Oct/23  Resolved: 17/Mar/20

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.4.0-rc0

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

Issue Links:
Backports
Related
related to SERVER-45096 Test safe reconfig never rolls back e... Closed
is related to SERVER-46800 Fix doReplSetReconfig to always retur... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4
Sprint: Repl 2020-03-23
Participants:

 Description   

Currently, the logic to wait for a new config to become committed after a safe reconfig lives inside the processReplSetReconfig method of ReplicationCoordinator. We should move this logic into its own, public method on ReplicationCoordinator that external clients can call separately after calling processReplSetReconfig. This will make it easier to write unit tests that don't want to block the calling thread to wait for a config to become committed. Since this waiting logic isn't required for enforcing the safety of safe reconfigs, it is acceptable to move this to a separate public function that can be called, or bypassed, by an external client. For the reconfig command, we will add a call to this new wait method after we process the reconfig command.



 Comments   
Comment by Githook User [ 18/Mar/20 ]

Author:

{'name': 'William Schultz', 'username': 'will62794', 'email': 'william.schultz@mongodb.com'}

Message: SERVER-46742 Add unit tests for ReplicationCoordinator::awaitConfigCommitment

(cherry picked from commit 0b0ca37fc915f9f50643b935ff5c5dca2fe96b0f)
Branch: v4.4
https://github.com/mongodb/mongo/commit/c55b9efdd1072661e260567cac3e670b4fb96e76

Comment by Githook User [ 18/Mar/20 ]

Author:

{'name': 'William Schultz', 'username': 'will62794', 'email': 'william.schultz@mongodb.com'}

Message: SERVER-46742 Move logic to wait for replica set config commitment into a dedicated public method

(cherry picked from commit c5ba5dcef83fd0cb6ffdcb7d999c46fd38ea5ac1)
Branch: v4.4
https://github.com/mongodb/mongo/commit/42dece50bd108815ab87ee866bf5a0b3c7035f01

Comment by Githook User [ 17/Mar/20 ]

Author:

{'name': 'William Schultz', 'email': 'william.schultz@mongodb.com', 'username': 'will62794'}

Message: SERVER-46742 Add unit tests for ReplicationCoordinator::awaitConfigCommitment
Branch: master
https://github.com/mongodb/mongo/commit/0b0ca37fc915f9f50643b935ff5c5dca2fe96b0f

Comment by Githook User [ 17/Mar/20 ]

Author:

{'name': 'William Schultz', 'email': 'william.schultz@mongodb.com', 'username': 'will62794'}

Message: SERVER-46742 Move logic to wait for replica set config commitment into a dedicated public method
Branch: master
https://github.com/mongodb/mongo/commit/c5ba5dcef83fd0cb6ffdcb7d999c46fd38ea5ac1

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