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

The batched write path on mongos/mongoq handles TenantMigrationAborted

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.2.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Fully Compatible
    • Server Serverless 2021-11-15

      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.

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

              Created:
              Updated:
              Resolved: