[SERVER-28269] Set _canAcceptNonLocalWrites at the end of signalDrainComplete() Created: 10/Mar/17  Updated: 06/Dec/17  Resolved: 06/Sep/17

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

Type: Task Priority: Major - P3
Reporter: Siyuan Zhou Assignee: Matthew Russotto
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
is related to SERVER-26970 isMaster can return isMaster: true wh... Closed
Backwards Compatibility: Fully Compatible
Participants:
Linked BF Score: 0

 Description   

In signalDrainComplete(), _canAcceptNonLocalWrites should be the last thing to do after writing down the "new primary" no-op and enabling balancer, which matches users' expectation.

Since balancer initialization needs to write to admin database, we need to introduce an RAII type AllowWritesBlock and a flag as a decoration of operation context to allow non-local writes even if the node is not primary.



 Comments   
Comment by Githook User [ 06/Sep/17 ]

Author:

{'username': 'mtrussotto', 'name': 'Matthew Russotto', 'email': 'matthew.russotto@10gen.com'}

Message: SERVER-28269 Set _canAcceptNonLocalWrites at the end of signalDrainComplete()
Branch: master
https://github.com/mongodb/mongo/commit/7d38c4ab9e7ca5e8e8a5cae6512c171beeb9ce70

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