[SERVER-40335] Don't wait for election handoff in ReplSetTest.stopSet() Created: 25/Mar/19  Updated: 29/Oct/23  Resolved: 15/Apr/19

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.6.15, 4.0.10, 4.1.11

Type: New Feature Priority: Major - P3
Reporter: Mira Carey Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Duplicate
is duplicated by SERVER-40252 Signaling 1-node replica set to shut ... Closed
Problem/Incident
Related
related to SERVER-40252 Signaling 1-node replica set to shut ... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.0, v3.6
Sprint: Service Arch 2019-04-22
Participants:
Linked BF Score: 41

 Description   

SERVER-38994 introduced a new step in process shutdown. When a process is exiting cleanly due to a signal, we now attempt a stepdown as if from a default argument shutdown command.

This introduces an extra 10 second wait for many of our tests, which we don't need.

Adding a setParameter to control that timeout would allow us to claw some of that time back.



 Comments   
Comment by Githook User [ 07/Oct/19 ]

Author:

{'name': 'Rahul Sundararaman', 'email': 'rahul.sundararaman@mongodb.com'}

Message: SERVER-40335 Add waitForStepDownOnNonCommandShutdown parameter

When ReplSetTest.stopSet() kills the primary with SIGTERM, it must wait for the
primary to finish election handoff or, in cases where there is no candidate,
for the 10-second election handoff timeout to expire. Add a parameter and use
it in ReplSetTest.stopSet() to end tests quickly.

Disable waitForStepDownOnNonCommandShutdown for replica sets started directly
by resmoke.py so those sets shutdown quickly, too.

(cherry picked from commit 2a20c5b)
Branch: v3.6
https://github.com/mongodb/mongo/commit/d89bfb85a3f5b750eac0cdc9b1a7ae08ec05eaa0

Comment by Githook User [ 02/Oct/19 ]

Author:

{'username': 'jameswahlin', 'email': 'james.wahlin@mongodb.com', 'name': 'James Wahlin'}

Message: Revert "SERVER-40335 Add waitForStepDownOnNonCommandShutdown parameter"

This reverts commit 36ea8ab7ef05b9dedb133987d825a8b39cdcbfdd.
Branch: v3.6
https://github.com/mongodb/mongo/commit/c86a9f91a901dc7ea3357a3caab9ec4448856bad

Comment by Githook User [ 01/Oct/19 ]

Author:

{'email': 'rahul.sundararaman@mongodb.com', 'name': 'Rahul Sundararaman'}

Message: SERVER-40335 Add waitForStepDownOnNonCommandShutdown parameter

When ReplSetTest.stopSet() kills the primary with SIGTERM, it must wait for the
primary to finish election handoff or, in cases where there is no candidate,
for the 10-second election handoff timeout to expire. Add a parameter and use
it in ReplSetTest.stopSet() to end tests quickly.

Disable waitForStepDownOnNonCommandShutdown for replica sets started directly
by resmoke.py so those sets shutdown quickly, too.

(cherry picked from commit 2a20c5b7095a07141fafd21047cbfe49a502301d)
Branch: v3.6
https://github.com/mongodb/mongo/commit/36ea8ab7ef05b9dedb133987d825a8b39cdcbfdd

Comment by Githook User [ 15/Apr/19 ]

Author:

{'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}

Message: SERVER-40335 Add waitForStepDownOnNonCommandShutdown parameter

When ReplSetTest.stopSet() kills the primary with SIGTERM, it must wait for the
primary to finish election handoff or, in cases where there is no candidate,
for the 10-second election handoff timeout to expire. Add a parameter and use
it in ReplSetTest.stopSet() to end tests quickly.

Disable waitForStepDownOnNonCommandShutdown for replica sets started directly
by resmoke.py so those sets shutdown quickly, too.
Branch: v4.0
https://github.com/mongodb/mongo/commit/2a20c5b7095a07141fafd21047cbfe49a502301d

Comment by Githook User [ 15/Apr/19 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}

Message: SERVER-40335 Add waitForStepDownOnNonCommandShutdown parameter

When ReplSetTest.stopSet() kills the primary with SIGTERM, it must wait for the
primary to finish election handoff or, in cases where there is no candidate,
for the 10-second election handoff timeout to expire. Add a parameter and use
it in ReplSetTest.stopSet() to end tests quickly.

Disable waitForStepDownOnNonCommandShutdown for replica sets started directly
by resmoke.py so those sets shutdown quickly, too.
Branch: master
https://github.com/mongodb/mongo/commit/90e078c73d49da75dd061005efc607c4e2721ae9

Comment by A. Jesse Jiryu Davis [ 08/Apr/19 ]

Would we prefer a simpler enableElectionHandoffAtShutdown instead of a parameter that changes the timeout? Arguments in favor:

  • It's analogous to an existing parameter, enableElectionHandoff, which is a boolean instead of a timeout
  • It's simpler, it can only be on or off
Generated at Thu Feb 08 04:54:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.