[SERVER-73661] Improve applyOperation_inlock() API. Created: 06/Feb/23  Updated: 13/Jul/23

Status: Open
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, repl-shortlist
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-41371 Unify NamespaceNotFound handling when... Backlog
related to SERVER-78834 Unify constraint checking knobs used ... Backlog
is related to SERVER-69001 Initial sync should set the minValid ... Closed
Assigned Teams:
Replication
Participants:

 Description   

Currently applyOperation_inlock() accepts 2 input parameters bool isDataConsistent and OplogApplication::Mode mode .

isDataConsistent value is determined based on repl consistency marker minvalid. And, used to determine if we need to record pre/postimage for change collection and retryable writes.

In general, mode value is used for taking many decisions in our code-base , notable once are 1) Need to ignore errors or not? 2) Record pre-post-images or not? 3) processing behavior of oplog entries

I am wondering if we can combine the essence of those 2 parameters into a single parameter to improve code clarity.

Just to be noted, FCBIS apply oplog entries with mode kRecovering. This means, only logical initial uses kInitialSync mode who data is always inconsistent in initial syncing mode. And, any change we do as part of ticket should ensure that we don't break backup and restore code (See here for historical related discussion)



 Comments   
Comment by Suganthi Mani [ 06/Feb/23 ]

opal.hoyt@mongodb.com It's not blocking any work. I happened to work on that function for shard merge project and I had difficulty in understanding those parameters and setting value for those parameters for shard merge.

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