[SERVER-26403] Clean primary states on stepdown Created: 30/Sep/16  Updated: 07/Dec/16  Resolved: 18/Nov/16

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

Type: Bug Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Siyuan Zhou
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-26394 prohibit choosing ourselves as a sync... Closed
related to SERVER-27120 Increase synchronization between prod... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2016-11-21
Participants:
Linked BF Score: 0

 Description   

We should clean the states _isCatchingUp and _isWaitingForDrainToComplete on stepdown. Thus we don't rely on the applier thread (rsSync) to do the job. This work should also be backported to 3.2 after we backport oplog as buffer.



 Comments   
Comment by Spencer Brody (Inactive) [ 18/Nov/16 ]

We need to do SERVER-27120 instead of this.

Comment by Githook User [ 18/Nov/16 ]

Author:

{u'username': u'visualzhou', u'name': u'Siyuan Zhou', u'email': u'siyuan.zhou@mongodb.com'}

Message: Revert "SERVER-26403 Clean primary states on stepdown"

This reverts commit 6904d0ac5ea4bba1822103eb4e7a623cc81de641.
Branch: v3.4
https://github.com/mongodb/mongo/commit/cf4d9f77e5bcb609272721bc87b03a795fa21b1f

Comment by Githook User [ 18/Nov/16 ]

Author:

{u'username': u'visualzhou', u'name': u'Siyuan Zhou', u'email': u'siyuan.zhou@mongodb.com'}

Message: Revert "SERVER-26403 Clean primary states on stepdown"

This reverts commit 6904d0ac5ea4bba1822103eb4e7a623cc81de641.
Branch: master
https://github.com/mongodb/mongo/commit/8c5d01498d1dfa8eef4292db4d32e6e6465a1580

Comment by Siyuan Zhou [ 18/Nov/16 ]

Talked with spencer, we agreed to reopen this ticket and revert the commit on master and 3.4, because a primary that steps down in drain mode and steps up again could possibly see the sentinel put by bgsync for the first drain mode and finishes the second drain mode earlier. That leaves ops in the buffer from the past. Those ops will be applied and make the oplog out of order if the node steps down later.

Without this patch, the step-up will abort the server after the first stepdown, preventing the out of order oplog at least. This patch fixed that abort, but leads to another problem.

Comment by Githook User [ 16/Nov/16 ]

Author:

{u'username': u'visualzhou', u'name': u'Siyuan Zhou', u'email': u'siyuan.zhou@mongodb.com'}

Message: SERVER-26403 Clean primary states on stepdown
Branch: master
https://github.com/mongodb/mongo/commit/6904d0ac5ea4bba1822103eb4e7a623cc81de641

Comment by Scott Hernandez (Inactive) [ 30/Sep/16 ]

The check that could be used in the other server issue would use these variables, so it would be good if they are correct so it works.

Comment by Spencer Brody (Inactive) [ 30/Sep/16 ]

scotthernandez, can you explain how this is related to SERVER-26394?

Comment by Spencer Brody (Inactive) [ 30/Sep/16 ]

This is causing invariant failures - should this be 3.3 Required?

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