summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-03-16 11:18:49 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2023-03-16 11:18:49 +0000
commitdcf41da1482b5f359ebce7f6395e00017199ca1d (patch)
treee49c0b2f4127a11178713ae4ed8fad3462034c87 /searchcore
parentbdd516c3396fd5465c3c2ebf742cfadf20d8a8b1 (diff)
Follow config also for watermark.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp b/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp
index 3147542729f..4798ebd8fbc 100644
--- a/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp
@@ -25,7 +25,8 @@ std::unique_ptr<SyncableThreadExecutor>
createExecutorWithOneThread(const ThreadingServiceConfig & cfg, vespalib::Runnable::init_fun_t init_function) {
uint32_t taskLimit = cfg.defaultTaskLimit();
if (cfg.optimize() == OptimizeFor::THROUGHPUT) {
- return std::make_unique<SingleExecutor>(std::move(init_function), taskLimit, cfg.is_task_limit_hard(), taskLimit/10, 100ms);
+ uint32_t watermark = (cfg.kindOfwatermark() == 0) ? taskLimit / 10 : cfg.kindOfwatermark();
+ return std::make_unique<SingleExecutor>(std::move(init_function), taskLimit, cfg.is_task_limit_hard(), watermark, 100ms);
} else {
if (cfg.is_task_limit_hard()) {
return std::make_unique<BlockingThreadStackExecutor>(1, taskLimit, std::move(init_function));