Small improvements for oplog fetcher

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Query Execution
    • Fully Compatible
    • QE 2026-05-25
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      This PR makes small refactors and minor efficiency improvements in the replication oplog fetcher, primarily around document validation, batch materialization, and const-correctness.

      Changes:

      • Precompute the `gReduceMajorityWriteLatency` feature-flag check once per `validateDocuments()` call instead of per document.
      • Reserve batch vector capacity based on the cursor’s remaining objects in the current batch to reduce reallocations.
      • Mark `_checkRemoteOplogStart()` / `_checkTooStaleToSyncFromSource()` as const.

            Assignee:
            Jan Steemann
            Reporter:
            Jan Steemann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: