Make oplog_truncation_size_based.js less sensitive to timing

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Some test improvements I noticed while working on https://github.com/10gen/mongo/pull/60458

      Replace sleeps + timing assumptions in oplog_truncation_size_based.js with failpoints and retries. This is going to be more important after SERVER-132836 once we're always sampling to create the initial markers, because sampling is faster than scanning and initial truncation happens sooner.

      • Use hangOplogCapMaintainerThread failpoint to hold off truncation until after initial checks are done
      • Retry on CappedPositionLost when running queries against the oplog collection
      • Use assert.soon retries on more checks

            Assignee:
            Anna Veselova
            Reporter:
            Anna Veselova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: