diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-22 10:35:09 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-22 10:35:09 +0000 |
commit | 88a133f5912fb32b8713d5e9792cb9d5ff729a23 (patch) | |
tree | 20658ec8cd201bc09c94ef620b85104201d3f72e | |
parent | 37925e563d403bdc2535a971757a6592bcb708d2 (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.cpp | 4 |
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(); })); } |