[SERVER-42525] Single-node replica sets shouldn't wait for electable caught up secondaries during shutdown Created: 31/Jul/19  Updated: 29/Oct/23  Resolved: 09/Sep/19

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 4.2.0-rc4
Fix Version/s: 4.3.1, 4.2.6, 3.6.18, 4.0.19

Type: Bug Priority: Critical - P2
Reporter: Mathias Stearn Assignee: Mihai Andrei
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-43988 shutdown ({force:false}) should refus... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.2, v4.0, v3.6
Steps To Reproduce:
  1. mongod --replSet asdf
  2. mongo --eval 'rs.initiate()'
  3. CTRL-C the mongod
  4. Wait...
  5. see the error message about "No electable secondaries caught up"
Sprint: Repl 2019-09-09
Participants:
Case:

 Description   

There are no secondaries to catch up. This probably also applies to replica sets with secondaries but only one electable replica.



 Comments   
Comment by Githook User [ 09/Apr/20 ]

Author:

{'name': 'Mihai Andrei', 'email': 'mihai.andrei@mongodb.com'}

Message: SERVER-42525 Single-node replica sets shouldn't wait for electable caught up secondaries during shutdown

(cherry picked from commit 2c3e8294acf82fff975a620b5fc45778c6ef2a45)
Branch: v4.0
https://github.com/mongodb/mongo/commit/8991b234b8c6b56e663bb7c2a996de380442698c

Comment by Githook User [ 09/Apr/20 ]

Author:

{'name': 'Mihai Andrei', 'email': 'mihai.andrei@mongodb.com'}

Message: SERVER-42525 Single-node replica sets shouldn't wait for electable caught up secondaries during shutdown

(cherry picked from commit 2c3e8294acf82fff975a620b5fc45778c6ef2a45)
Branch: v4.2
https://github.com/mongodb/mongo/commit/e3abfc3a47e1d76952d3ff4e3477b3f0440e5d3a

Comment by Githook User [ 31/Mar/20 ]

Author:

{'name': 'Mihai Andrei', 'email': 'mihai.andrei@mongodb.com'}

Message: SERVER-42525 Single-node replica sets shouldn't wait for electable caught up secondaries during shutdown

(cherry picked from commit 2c3e8294acf82fff975a620b5fc45778c6ef2a45)
Branch: v3.6
https://github.com/mongodb/mongo/commit/226949cc252af265483afbf859b446590b09b098

Comment by Rajesh Khanna (Inactive) [ 30/Mar/20 ]

Splunk have requested a backport of SERVER-42525 on their custom release.They are in the process of shipping Splunkversion 7.3.6 the code freeze for which is Apr 3,2020. They are asking for a backport prior to their codefreeze. Given this urgency, I am approving this to be a P2.

 

joe.caswell please can you provide Splunk's custom release details on which this backport should be made available ?

Comment by Githook User [ 09/Sep/19 ]

Author:

{'name': 'Mihai Andrei', 'email': 'mihai.andrei@mongodb.com'}

Message: SERVER-42525 Single-node replica sets shouldn't wait for electable caught up secondaries during shutdown
Branch: master
https://github.com/mongodb/mongo/commit/2c3e8294acf82fff975a620b5fc45778c6ef2a45

Comment by Judah Schvimer [ 12/Aug/19 ]

We should also investigate removing the server parameter workaround that was previously added for this.

Comment by Judah Schvimer [ 08/Aug/19 ]

We will do this for single node replica sets only.

Comment by Mira Carey [ 31/Jul/19 ]

I think where we may have strayed off into the weeds (with SERVER-40252) was in considering any replica sets with only electable node (rather than just sets with literally one configured node).

Comment by Judah Schvimer [ 31/Jul/19 ]

schwerin and alyson.cabral, we decided not to do this for our testing in SERVER-40252. I think that, as indicated by this ticket being created again, it's a bad first-touch experience with replication, something we are working to improve. I would like to change this behavior. Do you two have any further reservations? I know schwerin wanted product approval for the user visible change.

Comment by Max Hirschhorn [ 31/Jul/19 ]

redbeard0531, I had reported this same issue in SERVER-40252. We added a waitForStepDownOnNonCommandShutdown server parameter in SERVER-40335 and while that addresses the similar sort of issue in our correctness infrastructure, I'll never remember to specify it when running a 1-node replica set from my terminal locally.

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