summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2019-01-25 08:59:16 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2019-01-25 08:59:16 +0000
commitcc05c9e9a0af1be6dcede4d856b424438598baf6 (patch)
treee4cfc1aaa4b8eb22e28e8cf4026cb7a5435b1b0d /searchcore
parent17b3e101697673cf814f20103064f295c440bcaf (diff)
Take config override for num cores into account.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/proton.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
index 2f3fe34873e..1aa4fc29a21 100644
--- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp
@@ -114,7 +114,7 @@ Proton::ProtonFileHeaderContext::ProtonFileHeaderContext(const Proton &proton_,
assert(!_hostName.empty());
}
-Proton::ProtonFileHeaderContext::~ProtonFileHeaderContext() { }
+Proton::ProtonFileHeaderContext::~ProtonFileHeaderContext() = default;
void
Proton::ProtonFileHeaderContext::addTags(vespalib::GenericHeader &header,
@@ -434,7 +434,7 @@ Proton::~Proton()
if (_fs4Server) {
_fs4Server->shutDown();
}
- size_t numCores = std::max(1u, std::thread::hardware_concurrency());
+ size_t numCores = std::max(1u, _protonConfigurer.getActiveConfigSnapshot()->getBootstrapConfig()->getHwInfo().cpu().cores());
vespalib::ThreadStackExecutor closePool(std::min(_documentDBMap.size(), numCores), 0x20000);
closeDocumentDBs(closePool);
_documentDBMap.clear();