diff options
Diffstat (limited to 'jstests/replsets/libs/tenant_migration_util.js')
-rw-r--r-- | jstests/replsets/libs/tenant_migration_util.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/jstests/replsets/libs/tenant_migration_util.js b/jstests/replsets/libs/tenant_migration_util.js index d0e9354f1c1..381dc3855bd 100644 --- a/jstests/replsets/libs/tenant_migration_util.js +++ b/jstests/replsets/libs/tenant_migration_util.js @@ -262,6 +262,17 @@ var TenantMigrationUtil = (function() { return res; } + const ServerlessLockType = + {None: 0, ShardSplitDonor: 1, TenantMigrationDonor: 2, TenantMigrationRecipient: 3}; + + /** + * Return the active serverless operation lock, if one is acquired. + */ + function getServerlessOperationLock(node) { + return assert.commandWorked(node.adminCommand({serverStatus: 1, serverless: 1})) + .serverless.operationLock; + } + /** * Returns the TenantMigrationAccessBlocker serverStatus output for the multi-tenant migration * or shard merge for the given node. @@ -561,6 +572,8 @@ var TenantMigrationUtil = (function() { makeMigrationCertificatesForTest, makeX509OptionsForTest, isMigrationCompleted, + ServerlessLockType, + getServerlessOperationLock, getTenantMigrationAccessBlocker, getTenantMigrationAccessBlockers, getNumBlockedReads, |