summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-07-17 11:22:25 +0200
committerHenning Baldersheim <balder@oath.com>2018-07-17 11:22:25 +0200
commit2412247448a6ce5a09c1c34a87df6ac5b97805d0 (patch)
treee53643d631c010900cbd3837dd36e5b4ea02e05b /searchcore
parent4dd5539fc9b3800a983ba35b0d7f6976a7f02848 (diff)
Only wait 1 ms between targets
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp b/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp
index f5325faf73c..93e325a0f21 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp
@@ -8,6 +8,7 @@
#include "tls_stats_factory.h"
#include <vespa/searchcore/proton/common/eventlogger.h>
#include <vespa/vespalib/util/jsonwriter.h>
+#include <thread>
#include <vespa/log/log.h>
LOG_SETUP(".proton.flushengine.flushengine");
@@ -160,9 +161,9 @@ FlushEngine::Run(FastOS_ThreadInterface *, void *)
}
prevFlushName = flushNextTarget(prevFlushName);
if ( ! prevFlushName.empty()) {
- // Sleep at least 10 ms after a successful flush in order to avoid busy loop in case
- // of strategy error or target error.
- FastOS_Thread::Sleep(10);
+ // Sleep 1 ms after a successful flush in order to avoid busy loop in case
+ // of strategy or target error.
+ std::this_thread::sleep_for(1ms);
} else {
shouldIdle = true;
}