[SERVER-28097] add replset test command to wait for primary to accept writes Created: 24/Feb/17  Updated: 05/Apr/17  Resolved: 24/Feb/17

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

Type: Improvement Priority: Major - P3
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-27892 Clarify locking rules for _canAcceptN... Closed
Backwards Compatibility: Fully Compatible
Participants:
Linked BF Score: 0

 Description   

This is an extension of the work in SERVER-20979 where we added replset test commands (available to JS tests only) to allow tests to wait on replica set nodes to reach a certain member state or exit drain mode.

This ticket would add a function ReplicationCoordinator::waitForPrimaryToAcceptWrites() that would be called from the admin command replSetTest.



 Comments   
Comment by Benety Goh [ 24/Feb/17 ]

ReplSetTest.getPrimary() calls _isMaster() which ensures that the primary node, returned to the caller, can accept writes.

Comment by Spencer Brody (Inactive) [ 24/Feb/17 ]

Since ReplSetTest.getPrimary() determines who the primary is by looking at the ismaster field of ismaster command responses, I think once SERVER-26970 is complete this won't be necessary

Generated at Thu Feb 08 04:17:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.