diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-05-30 09:32:10 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-05-30 09:32:10 +0200 |
commit | 05d1ae6da326c26f5e94d60457a137e1bf5280c0 (patch) | |
tree | 9dfe69dd73b001995ee0cb6d7c243a1f8e63b46a /searchcore | |
parent | 771bea4326f1e33baa9b5d1a3d65788df4f972de (diff) |
Ensure that we have at least 1 guaranteed free worker.
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/proton.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp index c7ae1e0c3d8..1da0895e7d0 100644 --- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp @@ -282,7 +282,9 @@ Proton::init(const BootstrapConfig::SP & configSnapshot) vespalib::string fileConfigId; _warmupExecutor.reset(new vespalib::ThreadStackExecutor(4, 128*1024)); - const size_t summaryThreads = protonConfig.summary.log.numthreads; + // We need at least 1 guaranteed free worker in order to ensure progress so #documentsdbs + 1 should suffice, + // but we will not be cheap and give #documentsdbs * 2 + const size_t summaryThreads = std::max(protonConfig.summary.log.numthreads, protonConfig.documentdb.size() * 2); _summaryExecutor.reset(new vespalib::BlockingThreadStackExecutor(summaryThreads, 128*1024, summaryThreads*16)); InitializeThreads initializeThreads; if (protonConfig.initialize.threads > 0) { |