Fix read_and_write_distribution.js that uses wrong secondary read after majority write assumption

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.1.0-rc0, 8.0.0-rc4
    • Affects Version/s: 8.0.0-rc0
    • Component/s: None
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v8.0
    • CAR Team 2024-04-29, CAR Team 2024-05-13
    • 30
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Due to PM-3489, there is no guarantee to see documents by running a secondary read after a write with majority. 

      In `read_and_write_distribution.js`, analyze shard key is not finding any document, because the previous write is majority replicated (in the oplog) but not applied, so analyze shard key may fail with `CollectionIsEmptyLocally` before failing with the expected error.

      The goal of this ticket is to make that test not rely on the wrong assumption to see documents by the secondary read by analyze shard key after a majority write have inserted them.

              Assignee:
              Pol Pinol
              Reporter:
              Pol Pinol
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: