[SERVER-77627] Consolidate logic for checking if a collection is replicated Created: 31/May/23  Updated: 29/Oct/23  Resolved: 16/Aug/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Judah Schvimer Assignee: Kaitlin Mahar
Resolution: Fixed Votes: 0
Labels: repl-shortlist
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Sprint: Repl 2023-07-24, Repl 2023-08-07, Repl 2023-08-21
Participants:

 Description   

NamespaceString::isReplicated, ReplicationCoordinator::canAcceptWritesFor(), and  ReplicationCoordinator::canAcceptWritesFor_UNSAFE() all have overlapping logic to check if a collection is replicated. It is error-prone to have this logic in multiple places in ways that could diverge accidentally.



 Comments   
Comment by Githook User [ 16/Aug/23 ]

Author:

{'name': 'Kaitlin Mahar', 'email': 'kaitlin.mahar@mongodb.com', 'username': 'kmahar'}

Message: SERVER-77627 Consolidate logic for checking if a collection is replicated
Branch: master
https://github.com/mongodb/mongo/commit/4a6d0c3997a0df5569bfabc1536f2da6c8cd0fc1

Comment by Max Hirschhorn [ 31/May/23 ]

matt.kneiser@mongodb.com also pointed out there is are a couple ReplicationCoordinator::isOplogDisabledFor*() functions. Perhaps the StorEx team would additionally want to spend some time removing the concept of drop-pending namespace entirely given the work which was done under PM-1114 to push the logic into the storage engine and how enableMajorityReadConcern=false is no longer a possible configuration (SERVER-53247)?

Generated at Thu Feb 08 06:36:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.