[SERVER-47369] doReplSetReconfig should fail during primary drain mode Created: 06/Apr/20 Updated: 29/Oct/23 Resolved: 09/Apr/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc3, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Judah Schvimer | Assignee: | Judah Schvimer |
| Resolution: | Fixed | 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 | ||||||||||||
| Backport Requested: |
v4.4
|
||||||||||||
| Sprint: | Repl 2020-04-20 | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
The "_firstOpTimeOfMyTerm" will be { ts: Timestamp(2147483647, 0), t: 2147483647 }, and that causes an invariant. doReplSetReconfig is only meant to succeed once the primary can accept writes. |
| Comments |
| Comment by Githook User [ 24/Apr/20 ] |
|
Author: {'name': 'Judah Schvimer', 'email': 'judah@mongodb.com', 'username': 'judahschvimer'}Message: (cherry picked from commit 437b5f31521e39615553803324fae2b1ddb3b2b8) |
| Comment by Siyuan Zhou [ 23/Apr/20 ] |
|
Backporting this to 4.4 to ease the backport of |
| Comment by Siyuan Zhou [ 09/Apr/20 ] |
|
Good point. |
| Comment by Judah Schvimer [ 09/Apr/20 ] |
|
siyuan.zhou, do you need this backported? ISS does not. |
| Comment by Githook User [ 09/Apr/20 ] |
|
Author: {'name': 'Judah Schvimer', 'email': 'judah@mongodb.com', 'username': 'judahschvimer'}Message: |
| Comment by Judah Schvimer [ 06/Apr/20 ] |
|
I think the fix is that this check should check for "canAcceptNonLocalWrites". We already have the replication coordinator mutex, so we can easily check it there. |