diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-02 08:21:25 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-02 08:21:25 +0000 |
commit | 8ccbd239b2e78644ebfdff8d425f42b9990b6412 (patch) | |
tree | 8db49351614eec5c512586fda975e8b771e048fe /searchcorespi | |
parent | 22e19a3d5dae693f36f62a2b35fab9ef0f99581c (diff) |
Since we schedule the last chunk for commit in triggerSyncNow, we can assert that we will be fully synced on the next pull when it happens in the singleCommitter thread.
That allows for further simplification.
Diffstat (limited to 'searchcorespi')
-rw-r--r-- | searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp index d5297fe8f8c..1153a09d09f 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp +++ b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp @@ -37,7 +37,7 @@ using search::queryeval::ISourceSelector; using search::queryeval::Source; using search::SerialNum; using vespalib::makeLambdaTask; -using vespalib::makeLambdaCallback; +using vespalib::makeSharedLambdaCallback; using std::ostringstream; using vespalib::string; using vespalib::Executor; @@ -313,7 +313,7 @@ IndexMaintainer::loadDiskIndex(const string &indexDir) _disk_indexes->setActive(indexDir, stats.sizeOnDisk()); auto retval = std::make_shared<DiskIndexWithDestructorCallback>( std::move(index), - makeLambdaCallback([this, indexDir]() { deactivateDiskIndexes(indexDir); }), + makeSharedLambdaCallback([this, indexDir]() { deactivateDiskIndexes(indexDir); }), _layout, *_disk_indexes); if (LOG_WOULD_LOG(event)) { EventLogger::diskIndexLoadComplete(indexDir, vespalib::count_ms(timer.elapsed())); @@ -336,7 +336,7 @@ IndexMaintainer::reloadDiskIndex(const IDiskIndex &oldIndex) _disk_indexes->setActive(indexDir, stats.sizeOnDisk()); auto retval = std::make_shared<DiskIndexWithDestructorCallback>( std::move(index), - makeLambdaCallback([this, indexDir]() { deactivateDiskIndexes(indexDir); }), + makeSharedLambdaCallback([this, indexDir]() { deactivateDiskIndexes(indexDir); }), _layout, *_disk_indexes); if (LOG_WOULD_LOG(event)) { EventLogger::diskIndexLoadComplete(indexDir, vespalib::count_ms(timer.elapsed())); |