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

non_transaction_snapshot_reads_retry.js should be more permissive of slow builds

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc8
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • Fully Compatible
    • ALL
    • v8.0
    • Repl 2024-06-10
    • 200

      The scenario that we want to verify is that if we use a too-early afterClusterTime, then we retry on the SnapshotError. If we query after updateTS, then we still need to wait long enough that the afterClusterTime we choose has “aged out.” It’s that “aged out” part that we can’t guarantee that makes the test flaky.

      By “aged out,” I mean that WT no longer allows us to query the data at that time because it’s too far in the past. The WT history is cleaned up async, but as soon as the time is advanced (like via a w-majority write), WT no longer lets you read that history even if it hasn’t been deleted yet. The part we can’t guarantee is that when we do the w-majority write, the assigned optime is far enough past updateTS to age out the pre-updateTS history. One thing we could do is after the explicit sleep(), keep doing a read until we see that the clusterTime returned by mongod has advanced far enough. That doesn’t feel much better than the PR, though. There has to be some time waiting unless we can manually adjust the timestamps inside mongod.

            Assignee:
            brad.cater@mongodb.com Brad Cater
            Reporter:
            brad.cater@mongodb.com Brad Cater
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: