summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdityavardhan Agrawal <aa729@cornell.edu>2022-08-31 19:19:22 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-08-31 21:20:23 +0000
commit3a3b70ef88332a8989d4385c14131a840f82eee9 (patch)
tree5284913786143303a9c0d5ae0e8e08389b3c0aac
parentf3b689770ec69bd9ac089ec4b96a678bb0d565b9 (diff)
downloadmongo-3a3b70ef88332a8989d4385c14131a840f82eee9.tar.gz
SERVER-65337 set minThreads to 0: TenantMigrationDonorService, TenantMigrationRecipientService, ShardSplitDonorService.
-rw-r--r--src/mongo/db/repl/repl_server_parameters.idl41
-rw-r--r--src/mongo/db/repl/tenant_migration_donor_service.h1
-rw-r--r--src/mongo/db/repl/tenant_migration_recipient_service.cpp1
-rw-r--r--src/mongo/db/serverless/shard_split_donor_service.cpp5
4 files changed, 47 insertions, 1 deletions
diff --git a/src/mongo/db/repl/repl_server_parameters.idl b/src/mongo/db/repl/repl_server_parameters.idl
index 54d50dd464e..00ae89e4c7b 100644
--- a/src/mongo/db/repl/repl_server_parameters.idl
+++ b/src/mongo/db/repl/repl_server_parameters.idl
@@ -483,6 +483,16 @@ server_parameters:
validator:
gte: 1
+ minTenantMigrationRecipientThreadPoolSize:
+ description: >-
+ The minimum number of threads in the tenant migration recipient's thread pool.
+ set_at: startup
+ cpp_vartype: int
+ cpp_varname: minTenantMigrationRecipientThreadPoolSize
+ default: 0
+ validator:
+ gte: 1
+
maxTenantMigrationDonorServiceThreadPoolSize:
description: >-
The maximum number of threads in the tenant migration donor service's thread pool.
@@ -492,6 +502,37 @@ server_parameters:
default: 8
validator:
gte: 1
+
+ minTenantMigrationDonorServiceThreadPoolSize:
+ description: >-
+ The minimum number of threads in the tenant migration donor service's thread pool.
+ set_at: startup
+ cpp_vartype: int
+ cpp_varname: minTenantMigrationDonorServiceThreadPoolSize
+ default: 0
+ validator:
+ gte: 1
+
+ maxShardSplitDonorServiceThreadPoolSize:
+ description: >-
+ The maximum number of threads in the shard split donor service's thread pool.
+ set_at: startup
+ cpp_vartype: int
+ cpp_varname: maxShardSplitDonorServiceThreadPoolSize
+ default: 8
+ validator:
+ gte: 1
+
+ minShardSplitDonorServiceThreadPoolSize:
+ description: >-
+ The minimum number of threads in the shard split donor service's thread pool.
+ set_at: startup
+ cpp_vartype: int
+ cpp_varname: minShardSplitDonorServiceThreadPoolSize
+ default: 0
+ validator:
+ gte: 1
+
shardSplitTimeoutMS:
description: >-
diff --git a/src/mongo/db/repl/tenant_migration_donor_service.h b/src/mongo/db/repl/tenant_migration_donor_service.h
index 6eb481b45c1..c9f28ddcc07 100644
--- a/src/mongo/db/repl/tenant_migration_donor_service.h
+++ b/src/mongo/db/repl/tenant_migration_donor_service.h
@@ -59,6 +59,7 @@ public:
ThreadPool::Limits getThreadPoolLimits() const override {
ThreadPool::Limits limits;
limits.maxThreads = repl::maxTenantMigrationDonorServiceThreadPoolSize;
+ limits.minThreads = repl::minTenantMigrationDonorServiceThreadPoolSize;
return limits;
}
diff --git a/src/mongo/db/repl/tenant_migration_recipient_service.cpp b/src/mongo/db/repl/tenant_migration_recipient_service.cpp
index 539e7c486b9..75ebc74f64c 100644
--- a/src/mongo/db/repl/tenant_migration_recipient_service.cpp
+++ b/src/mongo/db/repl/tenant_migration_recipient_service.cpp
@@ -281,6 +281,7 @@ NamespaceString TenantMigrationRecipientService::getStateDocumentsNS() const {
ThreadPool::Limits TenantMigrationRecipientService::getThreadPoolLimits() const {
ThreadPool::Limits limits;
limits.maxThreads = maxTenantMigrationRecipientThreadPoolSize;
+ limits.minThreads = minTenantMigrationRecipientThreadPoolSize;
return limits;
}
diff --git a/src/mongo/db/serverless/shard_split_donor_service.cpp b/src/mongo/db/serverless/shard_split_donor_service.cpp
index 26e17a3e2b5..4c3fdabb39f 100644
--- a/src/mongo/db/serverless/shard_split_donor_service.cpp
+++ b/src/mongo/db/serverless/shard_split_donor_service.cpp
@@ -164,7 +164,10 @@ SemiFuture<HostAndPort> makeRecipientAcceptSplitFuture(
} // namespace detail
ThreadPool::Limits ShardSplitDonorService::getThreadPoolLimits() const {
- return ThreadPool::Limits();
+ ThreadPool::Limits limits;
+ limits.maxThreads = repl::maxShardSplitDonorServiceThreadPoolSize;
+ limits.minThreads = repl::minShardSplitDonorServiceThreadPoolSize;
+ return limits;
}
void ShardSplitDonorService::checkIfConflictsWithOtherInstances(