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

Commands should wait for write concern even if they throw an exception

    • Fully Compatible
    • ALL
    • v3.4, v3.2
    • Repl 2017-02-13, Repl 2017-04-17, Repl 2017-05-08

      Discovered while working on SERVER-25001.

      Even when a command fails or results in a no-op, if that failure was due to the state of the data files at that moment, and the command came with a w:majority write concern, we need to wait for the most recent optime to become committed, so that the data that caused the command to error will be visible on a subsequent majority read. We already do this properly when a command returns a failure by returning false, but if the command throws an exception we don't. This can lead to subtle problems with the maintenance of the config server optime, as well as leading to confusing behavior for users using readConcern:majority reads

            Assignee:
            spencer@mongodb.com Spencer Brody (Inactive)
            Reporter:
            spencer@mongodb.com Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: