-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
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.