diff options
author | Tor Egge <Tor.Egge@yahoo-inc.com> | 2017-03-17 13:45:59 +0000 |
---|---|---|
committer | Tor Egge <Tor.Egge@yahoo-inc.com> | 2017-03-17 13:45:59 +0000 |
commit | 4c4291043b03b292b7e9cbb44056d9388b2473f4 (patch) | |
tree | cb7a244ba920830f672b55943492cb90e596a957 /searchcorespi | |
parent | 8b8d2fd29f88296fc6b50074e9de7c6a237a6c4c (diff) |
Add serial number to index maintainer setSchema method, to allow for
implicit immediate history wipe later on.
Diffstat (limited to 'searchcorespi')
4 files changed, 5 insertions, 4 deletions
diff --git a/searchcorespi/src/tests/plugin/plugin.cpp b/searchcorespi/src/tests/plugin/plugin.cpp index 90aca88cdc6..eff33e69464 100644 --- a/searchcorespi/src/tests/plugin/plugin.cpp +++ b/searchcorespi/src/tests/plugin/plugin.cpp @@ -34,7 +34,7 @@ public: searchcorespi::IFlushTarget::List l; return l; } - virtual void setSchema(const Schema &) override { } + virtual void setSchema(const Schema &, SerialNum) override { } virtual void wipeHistory(SerialNum) override { } }; diff --git a/searchcorespi/src/vespa/searchcorespi/index/iindexmanager.h b/searchcorespi/src/vespa/searchcorespi/index/iindexmanager.h index d4999a2dd1f..c2976699edb 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/iindexmanager.h +++ b/searchcorespi/src/vespa/searchcorespi/index/iindexmanager.h @@ -156,7 +156,7 @@ public: * * @param schema The new schema to start using. **/ - virtual void setSchema(const Schema &schema) = 0; + virtual void setSchema(const Schema &schema, SerialNum serialNum) = 0; /** * Wipes remains of removed fields from this index manager. diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp index 642261fa4b5..76586bedf47 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp +++ b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp @@ -1180,8 +1180,9 @@ IndexMaintainer::getFlushTargets(void) } void -IndexMaintainer::setSchema(const Schema & schema) +IndexMaintainer::setSchema(const Schema & schema, SerialNum serialNum) { + (void) serialNum; assert(_ctx.getThreadingService().master().isCurrentThread()); IMemoryIndex::SP new_index(_operations.createMemoryIndex(schema, _current_serial_num)); SetSchemaArgs args; diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h index 3106b4ae374..b242a4a0933 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h +++ b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h @@ -381,7 +381,7 @@ public: } IFlushTarget::List getFlushTargets() override; - void setSchema(const Schema & schema) override ; + void setSchema(const Schema & schema, SerialNum serialNum) override ; void wipeHistory(SerialNum wipeSerial) override; }; |