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"

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • ALL
    • 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.
    • Execution Team 2020-01-27, Execution Team 2020-02-10, Execution Team 2020-03-09, Sharding 2020-04-20

      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.

            Assignee:
            randolph@mongodb.com Randolph Tan
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: