[SERVER-86192] insertDocumentForBulkLoader is only called when isOplogDisabledFor is true Created: 02/Feb/24  Updated: 06/Feb/24

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

Type: Task Priority: Major - P3
Reporter: Vishnu Kaushik Assignee: Vishnu Kaushik
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Storage Execution
Sprint: Execution Team 2024-03-04
Participants:

 Description   

Currently there is code in insertDocumentForBulkLoader that checks for when replCoord->isOplogDisabledFor(...) returns false, here.

I looked for callers of the insertDocumentForBulkLoader function and it seems it's only called from CollectionCloner, which is only used in initial sync. So that means that there won't ever be a case where isOplogDisabledFor returns false, as the oplog is disabled during initial sync.

A patch with the following added to it ran successfully:

invariant(replCoord->isOplogDisabledFor(opCtx, nss));

So we should be able to simplify that function since we are sure that it's only called in the initial sync context (for example, we can remove the check linked above).


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