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

Retrying findAndModify should not uassert if upsert=true but the oplog entry is for an update

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Sharding
    • Fully Compatible
    • ALL

      When reconstructing the response for findAndModify, if the oplog entry is for an update (opType='u'), there is a uassert that request does not have upsert=true - this should be removed, since upsert=true does not guarantee the request will result in an insert entry in the oplog. I saw randolph included this fix in his review for SERVER-30894, so this ticket can be closed once that is committed.

      Failing retryable_writes_jscore_passthrough tests:

      • find_and_modify.js
      • find_and_modify4.js
      • update_find_and_modify_id.js

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            jack.mulrow@mongodb.com Jack Mulrow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: