[SERVER-14788] Implement replica set cold start behavior in ReplicationCoordinatorImpl Created: 05/Aug/14  Updated: 02/Aug/18  Resolved: 19/Aug/14

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

Type: Task Priority: Major - P3
Reporter: Andy Schwerin Assignee: Eric Milkie
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

This task is to implement start-up code that loads a replica set config from the local.system.replset collection, and if it is valid, makes it the active configuration for the replica set node.



 Comments   
Comment by Githook User [ 11/Aug/14 ]

Author:

{u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-14788 Wire initial configuration loading into startReplication.

via Andy Schwerin.
Branch: master
https://github.com/mongodb/mongo/commit/4064ced405a51bedcb9da9d90f0320023e23728c

Comment by Githook User [ 08/Aug/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-14788 Make ReplicationCoordinatorImpl::startReplication threadsafe.

To follow the contract described in the header, it shouldn't be mutating pointers
to its top coord and repl executor, or changing its RID, so do that in the constructor,
instead. This makes the parameters to startReplication sane, as a side benefit.
Branch: master
https://github.com/mongodb/mongo/commit/1232c89874a8763375b65c438680e8441f65f021

Comment by Githook User [ 08/Aug/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-14788 Do not start threads in ReplicationExecutor's constructor.

By not starting threads in the ReplicationExecutor constructor, we can safely construct
it when constructing the ReplicationCoordinatorImpl that owns it, which allows us to
get rid of the weird behavior where we pass a NetworkInterface* to startReplication(),
and further allows us to clean up the concurrency rules for startReplication().
Branch: master
https://github.com/mongodb/mongo/commit/972264abaf49c46b0726841e4fa2444cd3f3d737

Comment by Githook User [ 07/Aug/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-14788 Simplify the fixture for running tests in repl_coordinator_impl_test.

These simplifications remove some memory leaks and make it easier to follow the initialization
logic. This is prerequisite to changes testing the loading local configurations during
startReplication().
Branch: master
https://github.com/mongodb/mongo/commit/88cc54431e112cd2edaa9042b3b20ba1b10fce82

Comment by Githook User [ 07/Aug/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-14788 Get isSelf functionality from ReplCoordinatorExternalState in parseReplSetSeedList.

This makes parseReplSetSeedList usable in ReplicationCoordinatorImpl.
Branch: master
https://github.com/mongodb/mongo/commit/48b0eb5b87ed6037541a0db3dac32b09b79c0bc2

Generated at Thu Feb 08 03:35:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.