aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-08-11 23:47:48 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-08-11 23:47:48 +0200
commit58c64dcee69101bf08bd632c2281feae9fa8474b (patch)
tree36c9676fa961747179aebf5385d5cf1a0f1e03dc
parent3fc705b00f1a96d81af9ae2724902f551b1d49f0 (diff)
If you need to restart, just do it right away. You are probably taking up somebody elses port.
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/program/fdispatch.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/searchcore/src/vespa/searchcore/fdispatch/program/fdispatch.cpp b/searchcore/src/vespa/searchcore/fdispatch/program/fdispatch.cpp
index c8e00e70ee7..fc0a57ff519 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/program/fdispatch.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/program/fdispatch.cpp
@@ -1,16 +1,13 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "fdispatch.h"
-
-#include <vespa/searchcore/util/log.h>
-#include <vespa/searchcore/util/eventloop.h>
+#include "engineadapter.h"
+#include "rpc.h"
#include <vespa/searchcore/fdispatch/search/querycacheutil.h>
#include <vespa/searchcore/fdispatch/search/nodemanager.h>
+#include <vespa/searchcore/util/eventloop.h>
#include <vespa/vespalib/util/exceptions.h>
#include <vespa/config/helper/configgetter.hpp>
-#include "engineadapter.h"
-#include "rpc.h"
-#include <thread>
#include <vespa/log/log.h>
LOG_SETUP(".fdispatch");
@@ -259,9 +256,7 @@ void Fdispatch::configure(std::unique_ptr<FdispatchrcConfig> cfg)
{
if (cfg && _config) {
if ( needRestart(*_config, *cfg) ) {
- const int sleepMS = (0.100 + 2 * _rndGen.nextDouble()) * 1000;
- LOG(warning, "Will restart by abort in %d ms.", sleepMS);
- std::this_thread::sleep_for(std::chrono::milliseconds(sleepMS));
+ LOG(warning, "Will restart by abort now.");
_needRestart.store(true);
}
}