summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-03-22 10:35:09 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-03-22 10:35:09 +0000
commit88a133f5912fb32b8713d5e9792cb9d5ff729a23 (patch)
tree20658ec8cd201bc09c94ef620b85104201d3f72e
parent37925e563d403bdc2535a971757a6592bcb708d2 (diff)
You must wait to select the active part until you are in the singleCommitter thread.
If not you it might chnage in the meantime.
-rw-r--r--searchlib/src/vespa/searchlib/transactionlog/domain.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/searchlib/src/vespa/searchlib/transactionlog/domain.cpp b/searchlib/src/vespa/searchlib/transactionlog/domain.cpp
index 928497bf09d..0af1ffa7b33 100644
--- a/searchlib/src/vespa/searchlib/transactionlog/domain.cpp
+++ b/searchlib/src/vespa/searchlib/transactionlog/domain.cpp
@@ -214,9 +214,9 @@ Domain::triggerSyncNow(std::unique_ptr<vespalib::IDestructorCallback> after_sync
std::unique_lock guard(_currentChunkMutex);
commitAndTransferResponses(guard);
}
- _singleCommitter->execute(makeLambdaTask([after_sync=std::move(after_sync), domainPart=getActivePart()]() {
+ _singleCommitter->execute(makeLambdaTask([this, after_sync=std::move(after_sync)]() {
(void) after_sync;
- domainPart->sync();
+ getActivePart()->sync();
}));
}