checkMetadataConsistency may return SnapshotUnavailable from failed internal snapshot read

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0
    • Affects Version/s: 7.0.0, 8.0.0, 8.2.0, 9.0.0-rc0, 8.3.0, 9.1.0-rc0
    • Component/s: Replication, Sharding
    • None
    • Catalog and Routing
    • Fully Compatible
    • ALL
    • v9.0, v8.3, v8.0
    • CAR Team 2026-08-03, CAR Team 2026-08-17
    • 0
    • 馃煡 DDL
    • None
    • None
    • None
    • None
    • None
    • None

      In some places, checkMetadataConsistency does {readConcern: {level: "snapshot"}} reads, for example here or here.

      However a node that just stepped up as writable primary may not yet be able to satisfy snapshot reads (this depends on the JournalFlusher later setting the committed snapshot).

      If so, those reads will immediately fail here with a SnapshotUnavailable: "No committed OpTime for snapshot read" which is bubbled up to the top level checkMetadataConsistency command and then to the user.

      We should swallow the SnapshotUnavailable error in CMC (since it isn't indicative of an inconsistency) or find a way for those reads to wait for a committed snapshot.

            Assignee:
            Joan Bruguera Mic贸
            Reporter:
            Joan Bruguera Mic贸
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: