[SERVER-24811] replSetFreeze command can result in a crash if used during a dry-run election Created: 27/Jun/16  Updated: 08/Feb/17  Resolved: 14/Sep/16

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

Type: Bug Priority: Major - P3
Reporter: Eric Milkie Assignee: Benety Goh
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Duplicate
is duplicated by SERVER-25819 A replSetFreeze during an election wi... Closed
Related
related to SERVER-26249 replsetfreeze.js should wait for repl... Closed
is related to SERVER-15535 Master ticket for fixing all test fai... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Completed:
Sprint: Repl 17 (07/15/16), Repl 18 (08/05/16), Repl 2016-08-29, Repl 2016-09-19
Participants:
Linked BF Score: 0

 Description   

The replsetFreeze command can, under certain circumstances, change the role from candidate to leader. The circumstances that are covered by the current code logic are not fully correct, in particular during a dry-run election.

The invariant will fail with this comdition:

 _role == Role::candidate



 Comments   
Comment by Githook User [ 08/Feb/17 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-24811 replSetFreeze should fail if node is primary or running for election

(cherry picked from commit fec08a992e29f9b0a9a227602b040987d17a940e)
Branch: v3.2
https://github.com/mongodb/mongo/commit/5da1c4c81c7fbbc07d528b69cd5326f48ba21d68

Comment by Githook User [ 14/Sep/16 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-24811 TopologyCoordinator::prepareFreezeResponse returns next action; error if primary or running election.
Branch: master
https://github.com/mongodb/mongo/commit/96584082d979a932446f2948f3126e63b02b74af

Comment by Githook User [ 13/Sep/16 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-24811 replSetFreeze should fail if node is primary or running for election
Branch: master
https://github.com/mongodb/mongo/commit/fec08a992e29f9b0a9a227602b040987d17a940e

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