[SERVER-52947] Tenant migration donor should attach TransientTransactionError when returning TenantMigrationCommitted or TenantMigrationAborted on a transaction operation Created: 19/Nov/20 Updated: 29/Oct/23 Resolved: 16/Dec/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0-alpha0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Esha Maharishi (Inactive) | Assignee: | Andrew Shuvalov (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | pm-1791_milestone-H | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Sharding 2020-12-14, Sharding 2020-12-28 |
| Participants: |
| Description |
|
Originally we planned for the donor to just return TenantMigrationCommitted or TenantMigrationAborted without any error label, and have the proxy convert this to NoSuchTransaction with TransientTransactionError. However, max.hirschhorn pointed out that the donor could just attach TransientTransactionError itself, and there's no need to convert the error to NoSuchTransaction. Note that transaction operations that could fail with TenantMigrationCommitted or TenantMigrationAborted are commitTransaction or read with readConcern snapshot or afterClusterTime, so we should test that TransientTransactionError is attached on both of these. |
| Comments |
| Comment by Githook User [ 16/Dec/20 ] |
|
Author: {'name': 'Andrew Shuvalov', 'email': 'andrew.shuvalov@mongodb.com', 'username': 'shuvalov-mdb'}Message: |
| Comment by Andrew Shuvalov (Inactive) [ 08/Dec/20 ] |
|
As cheahuychou.mao explained, TransientTransactionError helps the caller doing a transaction or a read with particular read concerns to know that it is safe and correct to retry the entire transaction or read. To fix that, we add support of `case TennatMigrationAborted:` and `case TenantMigrationCommitted:` to this switch statement. The test to modify is `tenant_migration_concurrent_writes.js`. |