[SERVER-29015] TopologyCoordinator should not transition to candidate role in a single node replica set if we are in maintenance mode Created: 28/Apr/17 Updated: 30/Oct/23 Resolved: 21/Jun/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 3.4.1 |
| Fix Version/s: | 3.4.7, 3.5.10 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Vick Mena (Inactive) | Assignee: | Benety Goh |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Completed: | |||||||||||||
| Sprint: | Repl 2017-05-29, Repl 2017-06-19, Repl 2017-07-10 | ||||||||||||
| Participants: | |||||||||||||
| Case: | (copied to CRM) | ||||||||||||
| Description |
|
SIGABRT while attempting to reconfigure replica set
More data forthcoming |
| Comments |
| Comment by Githook User [ 13/Jul/17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: (cherry picked from commit 5dd64f88d2b66078c957eea5a7889076ee5956b6) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 21/Jun/17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Benety Goh [ 16/Jun/17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The issue seems to be that TopologyCoordinatorImpl::updateConfig() is erroneously allowing the node to transition to a "candidate" role when it's in maintenance node:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Judah Schvimer [ 02/May/17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I've attached a repro script in SERVER_29015.js. This repro can occur on https://github.com/mongodb/mongo/commit/435d43b66f04fc12fdb4f1e115d1fe9558571334. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Judah Schvimer [ 02/May/17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The invariant occurs when attempting to postpone finishing the reconfig until after the current election finishes. Outside of the lock, we reset the _voteRequester here on an election win and here on an election loss. We appear to change the TopologyCoordinator role to "Candidate" many times without creating a VoteRequester. If we had just reset the VoteRequester and then become a candidate, then we'll hit this invariant. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric Milkie [ 28/Apr/17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
More specifically, can you include the existing replica set configuration, and the proposed new configuration from the replSetReconfig command? Also, was the "force" flag to the reconfig command used? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Pasette (Inactive) [ 28/Apr/17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Can you include the replica set configuration? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||