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

Applying transfer mods in a migration does not handle write conflicts

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.4, v4.2
    • Sprint:
      Sharding 2020-03-23, Sharding 2020-04-06
    • Linked BF Score:
      24

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            alex.taskov Alexander Taskov
            Reporter:
            jack.mulrow Jack Mulrow
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: