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

Mongos can fail with "a non-retryable snapshot error" and "Unable to read from a snapshot due to pending collection catalog changes"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Investigating
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Storage
    • Labels:
      None
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

      I think the repro is:

      1. create an empty collection
      2. followed immediately by an insert in a transaction

       

      Note: part of the scenario might be creating the collection on one mongos and executing the transaction on a different mongos, but I'm not sure.

      Show
      I think the repro is: create an empty collection followed immediately by an insert in a transaction   Note: part of the scenario might be creating the collection on one mongos and executing the transaction on a different mongos, but I'm not sure.
    • Sprint:
      Execution Team 2020-01-27

      Description

      The full error message is:

      "Command insert failed: Transaction 3a15840d-e673-4fb1-b4a8-dad5bef4231f:1 was aborted on statement 0 due to: a non-retryable snapshot error :: caused by :: Encountered error from localhost:27019 during a transaction :: caused by :: Unable to read from a snapshot due to pending collection catalog changes; please retry the operation. Snapshot timestamp is Timestamp(1559738408, 3). Collection minimum is Timestamp(1559738412, 8)."
      

      The error message suggests retrying the operation, and in fact the operation DOES succeed after a retry.

      However, this seems like an unnecessary error to return to the application.

      The server should just block until the pending collection catalog changes have been completed and then execute the operation without error.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated: