diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-01-02 21:05:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-02 21:05:51 +0100 |
commit | 98933f7cd7ee770d36533cd13f60ed35dbbbb9dc (patch) | |
tree | ef3039e8a3671deb7c0b0da0394a3ec9a18e37dc | |
parent | 55851a1863780f78aa9c491761aa11abb09ece0f (diff) | |
parent | 12cb0ec384e782815368875d2578907222cfac0b (diff) |
Merge pull request #25363 from vespa-engine/balder/stop-current-sample-task-before-updating-config
Stop current task before updating config and restarting task.
-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]() { |