diff options
author | Misha Tyulenev <misha@mongodb.com> | 2017-06-23 16:40:32 -0400 |
---|---|---|
committer | Misha Tyulenev <misha@mongodb.com> | 2017-06-23 20:51:20 -0400 |
commit | f92fe733273f966fcb8397170376af1802c1e6a5 (patch) | |
tree | 31dd4d435b98062bd9d6f55da8ed0348e78b0a04 /src/mongo/s/sharding_initialization.cpp | |
parent | 8004de424a597cf5933f2380cb31c63c0558630a (diff) | |
download | mongo-f92fe733273f966fcb8397170376af1802c1e6a5.tar.gz |
SERVER-29248 Add parameter to adjust frequency of key rotation
Diffstat (limited to 'src/mongo/s/sharding_initialization.cpp')
-rw-r--r-- | src/mongo/s/sharding_initialization.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/s/sharding_initialization.cpp b/src/mongo/s/sharding_initialization.cpp index 7bd0e74ba90..7c1dddb4e2f 100644 --- a/src/mongo/s/sharding_initialization.cpp +++ b/src/mongo/s/sharding_initialization.cpp @@ -89,6 +89,9 @@ MONGO_EXPORT_STARTUP_SERVER_PARAMETER(ShardingTaskExecutorPoolRefreshRequirement MONGO_EXPORT_STARTUP_SERVER_PARAMETER(ShardingTaskExecutorPoolRefreshTimeoutMS, int, ConnectionPool::kDefaultRefreshTimeout.count()); +MONGO_EXPORT_STARTUP_SERVER_PARAMETER(KeysRotationIntervalSec, + int, + KeysCollectionManager::kKeyValidInterval.count()); namespace { @@ -100,7 +103,6 @@ using executor::ShardingTaskExecutor; static constexpr auto kRetryInterval = Seconds{2}; const std::string kKeyManagerPurposeString = "SigningClusterTime"; -const Seconds kKeyValidInterval(3 * 30 * 24 * 60 * 60); // ~3 months auto makeTaskExecutor(std::unique_ptr<NetworkInterface> net) { auto netPtr = net.get(); @@ -236,7 +238,7 @@ Status initializeGlobalShardingState(OperationContext* opCtx, } auto keyManager = stdx::make_unique<KeysCollectionManager>( - kKeyManagerPurposeString, grid->catalogClient(opCtx), kKeyValidInterval); + kKeyManagerPurposeString, grid->catalogClient(opCtx), Seconds(KeysRotationIntervalSec)); keyManager->startMonitoring(opCtx->getServiceContext()); LogicalTimeValidator::set(opCtx->getServiceContext(), |