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

Command with snapshot read concern without 'atClusterTime' can fail with SnapshotTooOld

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • ALL
    • Repl 2021-04-05

    Description

      In snapshot read concern, when the client does not specify an 'atClusterTime', the server will chose one in the command entry point to be the CurrentCommittedSnapshotOpTime. However, when the command gets executed, the currentCommitedSnapshotOpTime in the node could already have been advanced beyond the minSnapshotHistoryWindowInSeconds, so the command would fail to open the cursor and return SnapshotTooOld. This is because the selection of the opTime to read and the opening of the cursor does not happen atomically.
      The client can retry on that error, but it seems that this situation can potentially keep happening on retries. Thus the client can't deterministically get that query to eventually succeed.

      Attachments

        Activity

          People

            lingzhi.deng@mongodb.com Lingzhi Deng
            jordi.serra-torrens@mongodb.com Jordi Serra Torrens
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: