summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-03-01 11:36:55 +0100
committerGitHub <noreply@github.com>2022-03-01 11:36:55 +0100
commit891b71d8280041adcdb7de29ae2cff7ca016aab5 (patch)
tree25379dd9b8eef8fc7dfb93b5535f67945b4ac8d5 /storage
parenta997a80721071cd4c99ddc96d3d8b05c59a7f139 (diff)
parenta46a98bc7fd21a076470c06d560f42b5c7862b88 (diff)
Merge pull request #21467 from vespa-engine/balder/add-and-use-common-adjustTimeoutByDetectedHz
Add a simple adjustTimeoutByDetectedHz to compute a suitable timeout/…
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/distributor/distributor_stripe_pool.cpp2
-rw-r--r--storage/src/vespa/storage/distributor/distributor_stripe_thread.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/storage/src/vespa/storage/distributor/distributor_stripe_pool.cpp b/storage/src/vespa/storage/distributor/distributor_stripe_pool.cpp
index d501172731a..8b172743d27 100644
--- a/storage/src/vespa/storage/distributor/distributor_stripe_pool.cpp
+++ b/storage/src/vespa/storage/distributor/distributor_stripe_pool.cpp
@@ -15,7 +15,7 @@ DistributorStripePool::DistributorStripePool(bool test_mode, PrivateCtorTag)
_mutex(),
_parker_cond(),
_parked_threads(0),
- _bootstrap_tick_wait_duration(vespalib::from_s(1.0/vespalib::getVespaTimerHz())),
+ _bootstrap_tick_wait_duration(vespalib::adjustTimeoutByDetectedHz(1ms)),
_bootstrap_ticks_before_wait(10),
_single_threaded_test_mode(test_mode),
_stopped(false)
diff --git a/storage/src/vespa/storage/distributor/distributor_stripe_thread.cpp b/storage/src/vespa/storage/distributor/distributor_stripe_thread.cpp
index 94e4dc648cc..ae5445da620 100644
--- a/storage/src/vespa/storage/distributor/distributor_stripe_thread.cpp
+++ b/storage/src/vespa/storage/distributor/distributor_stripe_thread.cpp
@@ -11,7 +11,7 @@ DistributorStripeThread::DistributorStripeThread(TickableStripe& stripe,
DistributorStripePool& stripe_pool)
: _stripe(stripe),
_stripe_pool(stripe_pool),
- _tick_wait_duration(vespalib::from_s(1.0/vespalib::getVespaTimerHz())),
+ _tick_wait_duration(vespalib::adjustTimeoutByDetectedHz(1ms)),
_mutex(),
_event_cond(),
_park_cond(),