[SERVER-53109] Fix tenant_migration_conflicting_donor_start_migration_cmds.js from "FailedToSatisfyReadPreference" failures. Created: 30/Nov/20 Updated: 27/Oct/23 Resolved: 26/Jan/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Suganthi Mani | Assignee: | Lingzhi Deng |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | pm-1791_milestone-B | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Sprint: | Repl 2021-02-08 | ||||||||
| Participants: | |||||||||
| Description |
|
Once "Test different cloning read preference", currently starts 2 migration threads concurrently, one with readPreference 'Primary', and another with readPreference 'Secondary'. There are chances the migration with readPreference 'Secondary' thread can start first. If so, the recipient migration fails with "FailedToSatisfyReadPreference error as donor replica set is a single node replica set. The test expects one migration thread to pass and another thread to fail due to ConflictingOperationInProgress. But, in this case, one thread will hang (due to recipient migration failure - FailedToSatisfyReadPreference) and another thread will fail due to ConflictingOperationInProgress. |
| Comments |
| Comment by Lingzhi Deng [ 26/Jan/21 ] |
I don't think this is possible because the migration with readPreference 'Secondary' is run as migrationOpts1 and we start two migrations synchronously in order. startMigration will run donorStartMigration against the donor and so I think that makes sure the migration with readPreference 'Primary' runs first and persists a state doc first. Therefore, I believe the migration with readPreference 'Secondary' will always fail due to ConflictingOperationInProgress because there is alway an active migration under the same tenantId. And I don't find any BFs for this test. So I am closing this as "Works as Designed". |