[SERVER-61166] The batched write path on mongos/mongoq handles TenantMigrationAborted Created: 01/Nov/21  Updated: 29/Oct/23  Resolved: 10/Nov/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.2.0

Type: Task Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Mathis Bessa
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Server Serverless 2021-11-15
Participants:

 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.



 Comments   
Comment by Githook User [ 10/Nov/21 ]

Author:

{'name': 'mathisbessamdb', 'email': 'mathis.bessa@mongodb.com', 'username': 'mathisbessamdb'}

Message: SERVER-61166 Update batched write path on mongos mongoq to handle TenantMigrationAborted
Branch: master
https://github.com/mongodb/mongo/commit/195bfdd18bdfba1b98beb28628cef19d48d335de

Generated at Thu Feb 08 05:51:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.