[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:
Backports
Related
is related to SERVER-47142 Check primary before writing replset ... Closed
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: SERVER-47369 doReplSetReconfig should fail during primary drain mode

(cherry picked from commit 437b5f31521e39615553803324fae2b1ddb3b2b8)
Branch: v4.4
https://github.com/mongodb/mongo/commit/924ac658e95463ea07e8f948c40b33e2ffcbcbe9

Comment by Siyuan Zhou [ 23/Apr/20 ]

Backporting this to 4.4 to ease the backport of SERVER-47142.

Comment by Siyuan Zhou [ 09/Apr/20 ]

Good point. SERVER-47142 will be backported to 4.4. I'll double check this when SERVER-47142 is done.

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: SERVER-47369 doReplSetReconfig should fail during primary drain mode
Branch: master
https://github.com/mongodb/mongo/commit/437b5f31521e39615553803324fae2b1ddb3b2b8

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.

Generated at Thu Feb 08 05:13:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.