diff options
Diffstat (limited to 'searchcorespi')
-rw-r--r-- | searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp | 11 | ||||
-rw-r--r-- | searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h | 1 |
2 files changed, 9 insertions, 3 deletions
diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp index 64a58da3757..c075e98e1fc 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp +++ b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp @@ -1182,8 +1182,8 @@ IndexMaintainer::getFlushTargets(void) void IndexMaintainer::setSchema(const Schema & schema, SerialNum serialNum) { - (void) serialNum; assert(_ctx.getThreadingService().master().isCurrentThread()); + internalWipeHistory(schema, serialNum); IMemoryIndex::SP new_index(_operations.createMemoryIndex(schema, _current_serial_num)); SetSchemaArgs args; @@ -1198,11 +1198,10 @@ IndexMaintainer::setSchema(const Schema & schema, SerialNum serialNum) } void -IndexMaintainer::wipeHistory(SerialNum wipeSerial) +IndexMaintainer::internalWipeHistory(const Schema &schema, SerialNum wipeSerial) { assert(_ctx.getThreadingService().master().isCurrentThread()); ISearchableIndexCollection::SP new_source_list; - const Schema schema = getSchema(); IIndexCollection::SP coll = getSourceCollection(); updateIndexSchemas(*coll, schema, wipeSerial); updateActiveFusionWipeTimeSchema(schema); @@ -1225,5 +1224,11 @@ IndexMaintainer::wipeHistory(SerialNum wipeSerial) } } +void +IndexMaintainer::wipeHistory(SerialNum wipeSerial) +{ + internalWipeHistory(getSchema(), wipeSerial); +} + } // namespace index } // namespace searchcorespi diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h index b242a4a0933..34c25632012 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h +++ b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h @@ -287,6 +287,7 @@ class IndexMaintainer : public IIndexManager, bool makeSureAllRemainingWarmupIsDone(ISearchableIndexCollection::SP keepAlive); void scheduleCommit(); void commit(); + void internalWipeHistory(const Schema &schema, SerialNum wipeSerial); public: IndexMaintainer(const IndexMaintainer &) = delete; |