aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@yahoo-inc.com>2016-06-17 10:55:08 +0000
committerTor Egge <Tor.Egge@yahoo-inc.com>2016-06-17 10:55:08 +0000
commit1eac942e1cd633021d520e1bcaf5773618721791 (patch)
treef2c9708e233c564ad59501732ac7724fac5d6c11 /searchcore
parentf1004b3b19fb723292f844ce7b93489bf1a339b4 (diff)
Take lock at start of FlushEngine::setStrategy to avoid crash
issues with concurrent calls.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp b/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp
index b1a2e23fca0..a948933ca81 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/flushengine.cpp
@@ -395,6 +395,7 @@ FlushEngine::initFlush(const IFlushHandler::SP &handler, const IFlushTarget::SP
void
FlushEngine::setStrategy(IFlushStrategy::SP strategy)
{
+ vespalib::LockGuard strategyLock(_strategyLock);
MonitorGuard strategyGuard(_strategyMonitor);
if (_closed) {
return;