summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahooinc.com>2022-04-06 15:45:43 +0200
committerGitHub <noreply@github.com>2022-04-06 15:45:43 +0200
commit60489e5ce0874775eeb3d40a89ff5c23b41b6e0b (patch)
treeb076d7ea292678c23012573f4de0bcfc16bd1f85 /searchcore
parentd68a76ecb6c1f59c557f08a4278f340241e93ad6 (diff)
parent94db8d47eaaedf7c7ebb3c46220ebdc388cae6dd (diff)
Merge pull request #22005 from vespa-engine/vekterli/increase-file-resolve-time-to-10-min
Increase document DB config file resolve time from 5 to 10 minutes
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
index 54561ec6304..4e272e1af4c 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
@@ -24,6 +24,7 @@
#include <vespa/searchsummary/config/config-juniperrc.h>
#include <vespa/vespalib/time/time_box.h>
#include <vespa/vespalib/util/stringfmt.h>
+#include <vespa/vespalib/util/time.h>
#include <vespa/config/retriever/configsnapshot.hpp>
#include <thread>
#include <cassert>
@@ -318,6 +319,7 @@ DocumentDBConfigManager::update(FNET_Transport & transport, const ConfigSnapshot
MaintenanceConfigSP newMaintenanceConfig;
std::shared_ptr<const ThreadingServiceConfig> old_threading_service_config;
std::shared_ptr<const AllocConfig> old_alloc_config;
+ constexpr vespalib::duration file_resolve_timeout = 60s * 10;
if (!_ignoreForwardedConfig) {
if (!(_bootstrapConfig->getDocumenttypesConfigSP() &&
@@ -357,7 +359,7 @@ DocumentDBConfigManager::update(FNET_Transport & transport, const ConfigSnapshot
RankingConstants::Vector constants;
if (spec != "") {
config::RpcFileAcquirer fileAcquirer(transport, spec);
- vespalib::TimeBox timeBox(5*60, 5);
+ vespalib::TimeBox timeBox(vespalib::to_s(file_resolve_timeout), 5);
for (const RankingConstantsConfig::Constant &rc : newRankingConstantsConfig->constant) {
auto desc = fmt("name='%s', type='%s'", rc.name.c_str(), rc.type.c_str());
vespalib::string filePath = resolve_file(fileAcquirer, timeBox, desc, rc.fileref);
@@ -373,7 +375,7 @@ DocumentDBConfigManager::update(FNET_Transport & transport, const ConfigSnapshot
RankingExpressions expressions;
if (spec != "") {
config::RpcFileAcquirer fileAcquirer(transport, spec);
- vespalib::TimeBox timeBox(5*60, 5);
+ vespalib::TimeBox timeBox(vespalib::to_s(file_resolve_timeout), 5);
for (const RankingExpressionsConfig::Expression &rc : newRankingExpressionsConfig->expression) {
auto desc = fmt("name='%s'", rc.name.c_str());
vespalib::string filePath = resolve_file(fileAcquirer, timeBox, desc, rc.fileref);
@@ -389,7 +391,7 @@ DocumentDBConfigManager::update(FNET_Transport & transport, const ConfigSnapshot
OnnxModels::Vector models;
if (spec != "") {
config::RpcFileAcquirer fileAcquirer(transport, spec);
- vespalib::TimeBox timeBox(5*60, 5);
+ vespalib::TimeBox timeBox(vespalib::to_s(file_resolve_timeout), 5);
for (const OnnxModelsConfig::Model &rc : newOnnxModelsConfig->model) {
auto desc = fmt("name='%s'", rc.name.c_str());
vespalib::string filePath = resolve_file(fileAcquirer, timeBox, desc, rc.fileref);