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

Should retry a sorted findAndModify if conflicts are detected (non-MMAP only)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.3.4
    • Affects Version/s: 3.2.1
    • Component/s: Concurrency, Querying
    • None
    • Fully Compatible
    • ALL
    • Query F (02/01/16), Query 10 (02/22/16), Query 11 (03/14/16), Query 12 (04/04/16)
    • 0

      In the delete stage, we check to see if the document we're about to delete still exists, and still matches the query predicate (code here). If it no longer exists/matches, we skip it. This is undesirable during a sorted findAndModify, because if we are doing an in-memory sort, it will have a limit of 1, so skipping will effectively mean returning null (even if there may have been other matches).

      A similar problem exists in the update stage.

            Assignee:
            charlie.swanson@mongodb.com Charlie Swanson
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: