[SERVER-21425] stale term stepdown must be atomic Created: 12/Nov/15  Updated: 18/Nov/15  Resolved: 12/Nov/15

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

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

Issue Links:
Related
related to SERVER-21452 heartbeat response from secondary sho... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl C (11/20/15)
Participants:
Linked BF Score: 0

 Description   

Currently, if a primary detects that the term has increased, it schedules a stepdown (and state change) to eventually occur, but it updates its term immediately. This can cause issues, because other things can be scheduled ahead of the stepdown; these things can report to other nodes the new term but with the old primary.



 Comments   
Comment by Githook User [ 18/Nov/15 ]

Note: the following commit was not pushed into 3.2.0rc3. It was pushed into 3.2.0rc4.

Author:

{u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-21425 fix racy stepdown unit test
Branch: master
https://github.com/mongodb/mongo/commit/02125134302a6d07729eb60095af2bd85f729dfa

Comment by Githook User [ 16/Nov/15 ]

Author:

{u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-21425 temporarily comment out racy parts
Branch: master
https://github.com/mongodb/mongo/commit/02603b46c044115abb17e38f55fd3b151f42c18d

Comment by Githook User [ 12/Nov/15 ]

Author:

{u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: SERVER-21425 do not update term when triggering stepdown
Branch: master
https://github.com/mongodb/mongo/commit/0307dcde4cf50c4d245a6181e426343874950b4d

Generated at Thu Feb 08 03:57:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.