[SERVER-27053] Possibility to confirm w:majority write that has been rolled back Created: 15/Nov/16 Updated: 13/Apr/17 Resolved: 17/Nov/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 3.2.12, 3.4.0-rc4, 3.5.1 |
| Type: | Bug | Priority: | Blocker - P1 |
| Reporter: | Mathias Stearn | Assignee: | Spencer Brody (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | code-and-test | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Completed: | |||||||||||||||||
| Sprint: | Repl 2016-11-21 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||
| Description |
|
I think the following sequence of events will cause us to acknowlege a w:majority write that has been rolled back. It requires that the write comes from mongos so the flag to not drop the connection on stepdown has been set.
If awaitReplication_inlock() checked for interrupt before checking if the write was already satisfied, then we'd be okay since during stepdown we cancelled all running operations. But we don't ever check for interrupt in awaitReplication if the writeConcern is already satisfied by the time we reach awaitReplication(). |
| Comments |
| Comment by Githook User [ 25/Jan/17 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message:
|
| Comment by Spencer Brody (Inactive) [ 30/Dec/16 ] |
|
The bug in the description of this ticket doesn't apply to 3.2 since we close all connections on stepdown, there's no chance for the primary to step back up and then confirm a write from its old term. Therefore I am cancelling the backport to 3.2 request on this ticket. The fix in the commit on this ticket however also fixed one bug not in the description - which is a heartbeat that indicates that the stale primary needs to step down also causes it to advance its commit point and acknowledge a write that can in fact be rolled back. The fix for 3.2 for that bug comes from backporting |
| Comment by Githook User [ 17/Nov/16 ] |
|
Author: {u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}Message: (cherry picked from commit a557fd981d235f84d4a0865dc0bb6b5385fc7a21) |
| Comment by Githook User [ 17/Nov/16 ] |
|
Author: {u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}Message: |