Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-86192

insertDocumentForBulkLoader is only called when isOplogDisabledFor is true

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Storage Execution
    • Execution Team 2024-03-04

    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).

      Attachments

        Activity

          People

            vishnu.kaushik@mongodb.com Vishnu Kaushik
            vishnu.kaushik@mongodb.com Vishnu Kaushik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: