diff options
author | Andrew Shuvalov <andrew.shuvalov@mongodb.com> | 2020-11-19 18:40:54 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-12-08 21:23:20 +0000 |
commit | 987484b4aa34deea1db7d70228989b83448a24e8 (patch) | |
tree | b8ec3aeca2ee024d30e6f9457aec1476a3383a1c /jstests | |
parent | 77f5972b8ec882a751b5d74d710ab240ffde8ec6 (diff) | |
download | mongo-987484b4aa34deea1db7d70228989b83448a24e8.tar.gz |
SERVER-50467: Added TODO SERVER-53276 to fix recipient side tenant migration RSM lifetime bug
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/replsets/tenant_migration_concurrent_migrations.js | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/jstests/replsets/tenant_migration_concurrent_migrations.js b/jstests/replsets/tenant_migration_concurrent_migrations.js index 5589676c5bc..eeda516b7d1 100644 --- a/jstests/replsets/tenant_migration_concurrent_migrations.js +++ b/jstests/replsets/tenant_migration_concurrent_migrations.js @@ -64,8 +64,8 @@ const kTenantIdPrefix = "testTenantId"; assert.commandWorked(tenantMigrationTest1.waitForMigrationToComplete(migrationOpts1)); // Verify that both migrations succeeded. - assert(stateRes0.state, TenantMigrationTest.State.kCommitted); - assert(stateRes1.state, TenantMigrationTest.State.kCommitted); + assert.eq(stateRes0.state, TenantMigrationTest.State.kCommitted); + assert.eq(stateRes1.state, TenantMigrationTest.State.kCommitted); const connPoolStatsAfter0 = assert.commandWorked(donorPrimary.adminCommand({connPoolStats: 1})); // Donor targeted two different replica sets. @@ -79,6 +79,13 @@ const kTenantIdPrefix = "testTenantId"; // After migrations are complete, RSMs are garbage collected. const connPoolStatsAfter1 = assert.commandWorked(donorPrimary.adminCommand({connPoolStats: 1})); assert.eq(Object.keys(connPoolStatsAfter1.replicaSets).length, 0); + + // TODO: SERVER-53276 the RSM from recipient rst1 to donor rst0 is not deleted. + // assert.eq( + // Object.keys(assert.commandWorked(rst1.getPrimary().adminCommand({connPoolStats: + // 1})).replicaSets) + // .length, + // 0); })(); // Test concurrent incoming migrations from different donors. @@ -110,8 +117,8 @@ const kTenantIdPrefix = "testTenantId"; assert.commandWorked(tenantMigrationTest1.waitForMigrationToComplete(migrationOpts1)); // Verify that both migrations succeeded. - assert(stateRes0.state, TenantMigrationTest.State.kCommitted); - assert(stateRes1.state, TenantMigrationTest.State.kCommitted); + assert.eq(stateRes0.state, TenantMigrationTest.State.kCommitted); + assert.eq(stateRes1.state, TenantMigrationTest.State.kCommitted); // Cleanup. assert.commandWorked(tenantMigrationTest0.forgetMigration(migrationOpts0.migrationIdString)); @@ -121,9 +128,11 @@ const kTenantIdPrefix = "testTenantId"; assert.commandWorked(rst0.getPrimary().adminCommand({connPoolStats: 1})); assert.eq(Object.keys(connPoolStatsAfter0.replicaSets).length, 0); - const connPoolStatsAfter1 = - assert.commandWorked(rst1.getPrimary().adminCommand({connPoolStats: 1})); - assert.eq(Object.keys(connPoolStatsAfter1.replicaSets).length, 0); + // TODO: SERVER-53276 the RSM from recipient rst1 to donor rst0 is not deleted in the test + // above. + // const connPoolStatsAfter1 = + // assert.commandWorked(rst1.getPrimary().adminCommand({connPoolStats: 1})); + // assert.eq(Object.keys(connPoolStatsAfter1.replicaSets).length, 0); })(); // Test concurrent outgoing migrations to same recipient. Verify that tenant |