summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);