[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: |
|
||||||||||||||||
| 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 |
| 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 " This reverts commit 6904d0ac5ea4bba1822103eb4e7a623cc81de641. |
| 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 " This reverts commit 6904d0ac5ea4bba1822103eb4e7a623cc81de641. |
| 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: |
| 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 |
| Comment by Spencer Brody (Inactive) [ 30/Sep/16 ] |
|
This is causing invariant failures - should this be 3.3 Required? |