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.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.1, 4.2.2
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.2
    • Steps To Reproduce:
      Hide

      See BF-13801 comments.

      Show
      See BF-13801 comments.
    • Sprint:
      Sharding 2019-09-23
    • Linked BF Score:
      15

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: