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

Applying transfer mods in a migration does not handle write conflicts

    • Fully Compatible
    • ALL
    • v4.4, v4.2
    • Sharding 2020-03-23, Sharding 2020-04-06
    • 24

      After cloning the initial documents in a chunk range, the recipient in a migration fetches any new writes in the range from the donor and applies them locally. For new inserts and updates, the recipient uses Helpers::upsert(), without handling write conflict exceptions, so a concurrent write to an already cloned document may abort the migration. This can happen in normal operation because multi writes targeted without the shard key are broadcast to all shards and do not filter orphans. I haven't reproduced this with transferred deletes, but from code inspection, the same problem seems possible.

            alex.taskov@mongodb.com Alexander Taskov (Inactive)
            jack.mulrow@mongodb.com Jack Mulrow
            0 Vote for this issue
            5 Start watching this issue