summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahoo-inc.com>2016-09-08 15:17:13 +0200
committerArne H Juul <arnej@yahoo-inc.com>2016-09-08 15:17:13 +0200
commit22d9ab457630965c417b0a4e076aca4b00a42109 (patch)
tree544f2c171ba775744ca10145db6a49cc6b75806f /searchcore
parent8981f89add3f1c4233104a9c55148b4ce839b25a (diff)
rename class to TimeBox
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
index 64937100263..9a030555c50 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
@@ -8,7 +8,7 @@
LOG_SETUP(".proton.server.documentdbconfigmanager");
#include <vespa/config/helper/legacy.h>
#include <vespa/config/file_acquirer/file_acquirer.h>
-#include <vespa/vespalib/time/time_boxer.h>
+#include <vespa/vespalib/time/time_box.h>
using namespace config;
using namespace vespa::config::search::core;
@@ -189,13 +189,16 @@ DocumentDBConfigManager::update(const ConfigSnapshot & snapshot)
RankingConstants::Vector constants;
if (spec != "") {
config::RpcFileAcquirer fileAcquirer(spec);
- vespalib::TimeBoxer timeBox(5*60, 5);
+ vespalib::TimeBox timeBox(5*60, 5);
for (const RankingConstantsConfig::Constant &rc : newRankingConstantsConfig->constant) {
vespalib::string filePath;
LOG(info, "Waiting for file acquirer (name='%s', type='%s', ref='%s')",
rc.name.c_str(), rc.type.c_str(), rc.fileref.c_str());
while (timeBox.hasTimeLeft() && (filePath == "")) {
filePath = fileAcquirer.wait_for(rc.fileref, timeBox.timeLeft());
+ if (filePath == "") {
+ FastOS_Thread::Sleep(100);
+ }
}
LOG(info, "Got file path from file acquirer: '%s' (name='%s', type='%s', ref='%s')",
filePath.c_str(), rc.name.c_str(), rc.type.c_str(), rc.fileref.c_str());