[SERVER-78834] Unify constraint checking knobs used in oplog application. Created: 10/Jul/23  Updated: 20/Nov/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Suganthi Mani Assignee: Backlog - Replication Team
Resolution: Unresolved Votes: 0
Labels: former-quick-wins
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-76159 Image collection entry is not invalid... Open
is related to SERVER-73661 Improve applyOperation_inlock() API. Open
Assigned Teams:
Replication
Participants:

 Description   

In Server we have too many knobs for enabling constraints. And it’s unclear which constraints each knob is responsible for. Additionally, if the knobs have overlapping constraint list, it’s unclear which knobs will override others.

For example, say I would like to enable the index constraints. As per this method comment, setting OperationContext::_enforceConstraints true will enable the index key constraints. And, it's unclear if we need to enable the server parameter oplogApplicationEnforcesSteadyStateConstraints as well. Moreover, in In the oplog application code, we call ReplicationCoordinatorImpl::shouldRelaxIndexConstraint() which doesn’t even check the opCtx or the server parameter, it has it’s own decision making

We should investigate if we can unify those knobs. I am also wondering if we can also simplify OplogApplierUtils::applyOplogBatchCommon API. Currently it accepts - oplog application mode, allowNamespaceNotFoundErrorsOnCrudOps, isDataConsistent. Can this be simplified to just accept only the oplog application mode and the oplog application mode is used to decide whether to relax or enforce 'X'constraint?



 Comments   
Comment by Suganthi Mani [ 10/Jul/23 ]

CC benety.goh@mongodb.com for StoreEx visibility.

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