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

The batched write path on mongos/mongoq handles TenantMigrationAborted

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.2.0
    • None
    • None
    • None
    • Fully Compatible
    • Server Serverless 2021-11-15

    Description

      ClusterWriteCmd::runImpl calls cluster::write, which calls BatchWriteExec::executeBatch, which tracks routing errors for each write in the batch using TrackedErrors (BatchWriteOp::noteBatchResponse -> trackErrors -> addError). For each routing error that was tracked, BatchWriteExec::executeBatch tells the ChunkManagerTargeter to tell the CatalogCache to mark these shards as stale.

      This ticket is to update the above path to also handle TenantMigrationAborted. The existing jstest that insert passes TenantMigrationAborted back to the client should be updated to assert the insert now succeeds since mongos/mongoq retries internally. The test should be expanded to test a batch of inserts, where only some of the inserts fail with TenantMigrationAborted. See tenant_migration_concurrent_bulk_writes.js for an example.

      Attachments

        Activity

          People

            mathis.bessa@mongodb.com Mathis Bessa
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: