summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-12-19 15:03:02 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2016-12-19 15:05:41 +0100
commit4fe7baba2439dead0c66297f2bd4bfa1e3231722 (patch)
treecec2bf490df190ff6bcf9f4b9013630e01728401 /searchcore
parent5e0be21b1528b00c4d12656cd17e76bcfafc172c (diff)
Catch and ignore invalid config exception.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/protonconfigurer.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/protonconfigurer.cpp b/searchcore/src/vespa/searchcore/proton/server/protonconfigurer.cpp
index c8e468ad0cb..8919091aee1 100644
--- a/searchcore/src/vespa/searchcore/proton/server/protonconfigurer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/protonconfigurer.cpp
@@ -3,12 +3,14 @@
#include "protonconfigurer.h"
#include "bootstrapconfig.h"
#include <vespa/vespalib/util/exceptions.h>
+#include <thread>
#include <vespa/log/log.h>
LOG_SETUP(".proton.server.protonconfigurer");
using namespace vespa::config::search;
using namespace vespa::config::search::core;
using namespace config;
+using namespace std::chrono_literals;
namespace proton {
@@ -34,7 +36,12 @@ ProtonConfigurer::Run(FastOS_ThreadInterface * thread, void *arg)
(void) arg;
(void) thread;
while (!_retriever.isClosed()) {
- fetchConfigs();
+ try {
+ fetchConfigs();
+ } catch (const config::InvalidConfigException & e) {
+ LOG(warning, "Invalid config received. Ignoring and continuing with old config : %s", e.what());
+ std::this_thread::sleep_for(100ms);
+ }
}
}