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

handle errors that occur on the shard when findAndModify is converted to a transaction.

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.3.1, 4.2.2
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • ALL
    • v4.2
    • Hide

      See BF-13801 comments.

      Show
      See BF-13801 comments.
    • Sharding 2019-09-23
    • 15

      The findAndModify command tries to commit even after there is an error on one of the shards.

      From the BF Comments:

      Our theory is that the there is a failure after the findAndModify is converted into a transaction here: https://github.com/mongodb/mongo/blob/master/src/mongo/s/commands/cluster_find_and_modify_cmd.cpp#L323. The recursive invocation of _runCommand only throws an error if response.status is ok or if the response.data has an error that is is in

      {NeedRetargettingError, SnapshotError, ErrorCodes::StaleDbVersion}

      . So the command will try to commit if it's not one of these.

            Assignee:
            janna.golden@mongodb.com Janna Golden
            Reporter:
            lamont.nelson@mongodb.com Lamont Nelson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: