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

Test that a bulk write returns ok for the writes that complete before a migration starts blocking and TenantMigrationCommitted for the ones that don't

    • Fully Compatible
    • Sharding 2020-10-19, Sharding 2020-11-02

      MongoDB has a "bulk write" API that allows sending an array of writes in a single command.

      The bulk write can be "ordered" or "unordered", and returns an array of writeErrors for the writes that failed.

      When a bulk write is issued concurrently with a tenant migration, some of the writes may succeed before the migration starts blocking, and the remaining writes should return a TenantMigrationCommitted error in the writeErrors array.

      This ticket is to add a test that verifies this, and to write sample logic for parsing the writeErrors array and retrying only the writes that returned TenantMigrationCommitted against the recipient (and confirming they succeed against the recipient).

            Assignee:
            jason.zhang@mongodb.com Jason Zhang (Inactive)
            Reporter:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: