summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Osta <luis.osta@mongodb.com>2020-07-17 13:33:37 +0000
committerLuis Osta <luis.osta@mongodb.com>2020-07-17 15:26:06 +0000
commit4f6c8f380b032d7568b39c52629408f4680475b2 (patch)
treee3d6376e710aa5b97a7f9df87e0bcf85d50c20f7
parentd8d2e1cbb16bcefd5e7bf3ffd242f02d3334a186 (diff)
downloadmongo-server-49173.tar.gz
formattingserver-49173
-rw-r--r--jstests/replsets/tenant_migration_mtab_blocks_writes.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/jstests/replsets/tenant_migration_mtab_blocks_writes.js b/jstests/replsets/tenant_migration_mtab_blocks_writes.js
index 7afc1467e79..f3f16d4c627 100644
--- a/jstests/replsets/tenant_migration_mtab_blocks_writes.js
+++ b/jstests/replsets/tenant_migration_mtab_blocks_writes.js
@@ -1,5 +1,6 @@
/**
- *
+ * Tests that after donorStartCommand is run, that reads and writes should be blocked for the
+ * migrating tenant.
* @tags: [requires_fcv_46]
*/
@@ -41,6 +42,9 @@ jsTest.log('Running the serverStatus command.');
const migratingTenantServerStatus =
donorPrimary.adminCommand({serverStatus: 1}).migratingTenantAccessBlocker;
+// Due to the way that the state machine works, if both reads and writes are blocked, we know that
+// at some point only writes were blocked Thus both kBlockWrites and kBlockWritesAndReads are states
+// that are used.
assert.eq(migratingTenantServerStatus.access, kBlockReadsAndWrites);
assert(migratingTenantServerStatus.blockTimestamp);