diff options
author | Geir Storli <geirst@yahoo-inc.com> | 2016-07-08 09:14:39 +0200 |
---|---|---|
committer | Geir Storli <geirst@yahoo-inc.com> | 2016-07-08 09:14:39 +0200 |
commit | 4135b7819ad5fc1a9f5041e78d943bfe32b42fff (patch) | |
tree | 2a1e2cc4d2d84e999abba97d972d345c1ee51246 /searchcore | |
parent | 566365b6d695830729a9ce990df7b47ed40f5b28 (diff) |
Add function for setting unbound task limit.
Diffstat (limited to 'searchcore')
3 files changed, 9 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp index a7bf2623d65..1e15f68d7ab 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/documentdb.cpp @@ -445,7 +445,7 @@ DocumentDB::applyConfig(DocumentDBConfig::SP configSnapshot, _visibility.setVisibilityDelay(visibilityDelay); } if (_visibility.getVisibilityDelay() > 0) { - _writeService.setTaskLimit(std::numeric_limits<uint32_t>::max()); + _writeService.setUnboundTaskLimit(); } else { _writeService.setTaskLimit(_defaultExecutorTaskLimit); } diff --git a/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp b/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp index 683dfeaad5c..75bde228586 100644 --- a/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.cpp @@ -63,5 +63,11 @@ ExecutorThreadingService::setTaskLimit(uint32_t taskLimit) _attributeFieldWriter.setTaskLimit(taskLimit); } +void +ExecutorThreadingService::setUnboundTaskLimit() +{ + setTaskLimit(std::numeric_limits<uint32_t>::max()); +} + } // namespace proton diff --git a/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.h b/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.h index db060b15eee..7bbaebd3576 100644 --- a/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.h +++ b/searchcore/src/vespa/searchcore/proton/server/executorthreadingservice.h @@ -44,6 +44,8 @@ public: void setTaskLimit(uint32_t taskLimit); + void setUnboundTaskLimit(); + // Expose the underlying executors for stats fetching and testing. vespalib::ThreadStackExecutorBase &getMasterExecutor() { return _masterExecutor; |