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

renameBetweenDBs needs to always reposition its cursor in the event of a writeConflict

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.9.0, 4.4.7
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • v4.4
    • Execution Team 2021-03-22, Execution Team 2021-04-05
    • 135

    Description

      renameBetweenDBs has WriteConflictException handling that repositions (using seekExact) the cursor on the source collection if the RecordID of the beginning of the batch does not match the last observed RecordId. This is correct in most cases, but not if the writeConflict is observed on the first document of the batch.

      In this case the cursor on the source collection will invalidated, but not repositioned. Subsequent calls to next() will start over from the beginning. This can result in erroneously copying the same data from a source collection into the destination.

      Attachments

        Activity

          People

            louis.williams@mongodb.com Louis Williams
            louis.williams@mongodb.com Louis Williams
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: