aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeir Storli <geirst@verizonmedia.com>2021-09-09 10:19:48 +0200
committerGitHub <noreply@github.com>2021-09-09 10:19:48 +0200
commit0bd1f4da69f10cfe5f4de2585a7973240e9b42f5 (patch)
tree8f36efc8d31ed08fbff833df16029427d4fef91f
parentd8634ec51f22ec99e186d029fec3f034bbeb57cb (diff)
parent7739817edb2efdd9ac07203100038a454c6b6343 (diff)
Merge pull request #19022 from vespa-engine/geirst/main-distributor-thread-tick-wait-duration
Increase tick wait duration for main distributor thread when running …
-rw-r--r--storage/src/vespa/storage/storageserver/distributornode.cpp4
-rw-r--r--storageframework/src/vespa/storageframework/generic/thread/tickingthread.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/storage/src/vespa/storage/storageserver/distributornode.cpp b/storage/src/vespa/storage/storageserver/distributornode.cpp
index 0d129ffdb28..620bd3571ce 100644
--- a/storage/src/vespa/storage/storageserver/distributornode.cpp
+++ b/storage/src/vespa/storage/storageserver/distributornode.cpp
@@ -26,7 +26,9 @@ DistributorNode::DistributorNode(
: StorageNode(configUri, context, generationFetcher,
std::make_unique<HostInfo>(),
!communicationManager ? NORMAL : SINGLE_THREADED_TEST_MODE),
- _threadPool(framework::TickingThreadPool::createDefault("distributor")),
+ // TODO STRIPE: Change waitTime default to 100ms when legacy mode is removed.
+ _threadPool(framework::TickingThreadPool::createDefault("distributor",
+ (num_distributor_stripes > 0) ? 100ms : 5ms)),
_stripe_pool(std::make_unique<distributor::DistributorStripePool>()),
_context(context),
_timestamp_mutex(),
diff --git a/storageframework/src/vespa/storageframework/generic/thread/tickingthread.h b/storageframework/src/vespa/storageframework/generic/thread/tickingthread.h
index 0649d914c75..c80ba0e8945 100644
--- a/storageframework/src/vespa/storageframework/generic/thread/tickingthread.h
+++ b/storageframework/src/vespa/storageframework/generic/thread/tickingthread.h
@@ -78,6 +78,7 @@ struct ThreadLock {
struct TickingThreadPool : public ThreadLock {
using UP = std::unique_ptr<TickingThreadPool>;
+ // TODO STRIPE: Change waitTime default to 100ms when legacy mode is removed.
static TickingThreadPool::UP createDefault(
vespalib::stringref name,
vespalib::duration waitTime = 5ms,