diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-01-02 20:04:22 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-01-02 20:04:22 +0000 |
commit | 12cb0ec384e782815368875d2578907222cfac0b (patch) | |
tree | ef3039e8a3671deb7c0b0da0394a3ec9a18e37dc /searchcore | |
parent | 55851a1863780f78aa9c491761aa11abb09ece0f (diff) |
Stop current task before updating config and restarting task.
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/disk_mem_usage_sampler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/disk_mem_usage_sampler.cpp b/searchcore/src/vespa/searchcore/proton/server/disk_mem_usage_sampler.cpp index 9e09e968b49..1f3bb524f74 100644 --- a/searchcore/src/vespa/searchcore/proton/server/disk_mem_usage_sampler.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/disk_mem_usage_sampler.cpp @@ -41,8 +41,8 @@ DiskMemUsageSampler::setConfig(const Config &config, IScheduledExecutor & execut if (_periodicHandle && (_sampleInterval == config.sampleInterval) && !wasChanged) { return; } - _sampleInterval = config.sampleInterval; _periodicHandle.reset(); + _sampleInterval = config.sampleInterval; sampleAndReportUsage(); vespalib::duration maxInterval = std::min(vespalib::duration(1s), _sampleInterval); _periodicHandle = executor.scheduleAtFixedRate(makeLambdaTask([this]() { |