diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-02-17 13:33:36 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-02-17 13:33:36 +0000 |
commit | ba95e0e4c67c5444747a062272630b46ff0750ff (patch) | |
tree | 5ba8c871d26eb5551ccb9d88b035300e6b2f5c76 /storage/src | |
parent | 77e04dad6bc437de3c934b28fe9f3a1df54a01c5 (diff) |
Remove possibility to update waitTime, maxProcessTime and maxTicksBeforWait from config.
Diffstat (limited to 'storage/src')
3 files changed, 6 insertions, 11 deletions
diff --git a/storage/src/tests/distributor/top_level_distributor_test_util.cpp b/storage/src/tests/distributor/top_level_distributor_test_util.cpp index 2a61141865a..5dcc7f5c6ad 100644 --- a/storage/src/tests/distributor/top_level_distributor_test_util.cpp +++ b/storage/src/tests/distributor/top_level_distributor_test_util.cpp @@ -31,8 +31,8 @@ TopLevelDistributorTestUtil::~TopLevelDistributorTestUtil() = default; void TopLevelDistributorTestUtil::create_links() { - _node.reset(new TestDistributorApp(_config.getConfigId())); - _thread_pool = framework::TickingThreadPool::createDefault("distributor"); + _node = std::make_unique<TestDistributorApp>(_config.getConfigId()); + _thread_pool = framework::TickingThreadPool::createDefault("distributor", 100ms); _stripe_pool = DistributorStripePool::make_non_threaded_pool_for_testing(); _distributor.reset(new TopLevelDistributor( _node->getComponentRegister(), @@ -43,7 +43,7 @@ TopLevelDistributorTestUtil::create_links() _num_distributor_stripes, _host_info, &_message_sender)); - _component.reset(new storage::DistributorComponent(_node->getComponentRegister(), "distrtestutil")); + _component = std::make_unique<storage::DistributorComponent>(_node->getComponentRegister(), "distrtestutil"); }; void diff --git a/storage/src/vespa/storage/distributor/top_level_distributor.h b/storage/src/vespa/storage/distributor/top_level_distributor.h index 20a61acfa37..95bff77fe40 100644 --- a/storage/src/vespa/storage/distributor/top_level_distributor.h +++ b/storage/src/vespa/storage/distributor/top_level_distributor.h @@ -106,8 +106,8 @@ public: bool handleStatusRequest(const DelegatedStatusRequest& request) const override; - virtual framework::ThreadWaitInfo doCriticalTick(framework::ThreadIndex) override; - virtual framework::ThreadWaitInfo doNonCriticalTick(framework::ThreadIndex) override; + framework::ThreadWaitInfo doCriticalTick(framework::ThreadIndex) override; + framework::ThreadWaitInfo doNonCriticalTick(framework::ThreadIndex) override; // Called by DistributorStripe threads when they want to notify the cluster controller of changed stats. // Thread safe. diff --git a/storage/src/vespa/storage/storageserver/distributornode.cpp b/storage/src/vespa/storage/storageserver/distributornode.cpp index b7016220531..6fd8cded08e 100644 --- a/storage/src/vespa/storage/storageserver/distributornode.cpp +++ b/storage/src/vespa/storage/storageserver/distributornode.cpp @@ -26,9 +26,7 @@ DistributorNode::DistributorNode( : StorageNode(configUri, context, generationFetcher, std::make_unique<HostInfo>(), !communicationManager ? NORMAL : SINGLE_THREADED_TEST_MODE), - // TODO STRIPE: Change waitTime default to 100ms when legacy mode is removed. - _threadPool(framework::TickingThreadPool::createDefault("distributor", - (num_distributor_stripes > 0) ? 100ms : 5ms)), + _threadPool(framework::TickingThreadPool::createDefault("distributor", 100ms, 1, 5s)), _stripe_pool(std::make_unique<distributor::DistributorStripePool>()), _context(context), _timestamp_mutex(), @@ -72,9 +70,6 @@ DistributorNode::handleConfigChange(vespa::config::content::core::StorDistributo { framework::TickingLockGuard guard(_threadPool->freezeAllTicks()); _context.getComponentRegister().setDistributorConfig(c); - _threadPool->updateParametersAllThreads(std::chrono::milliseconds(c.ticksWaitTimeMs), - std::chrono::milliseconds(c.maxProcessTimeMs), - c.ticksBeforeWait); } void |