summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@yahoo-inc.com>2017-04-27 09:38:05 +0000
committerTor Egge <Tor.Egge@yahoo-inc.com>2017-04-27 09:38:05 +0000
commita3aef2d5cffd073f3d595cbb449382eb5d12086c (patch)
tree9aa53e7a3b6f033916149fac0e0b72116b34aec6
parentbdca4a50921ff927f0f399e146a972165e20c173 (diff)
Rename wipeHistory() to pruneRemovedFields() in handling of indexed fields.
-rw-r--r--searchcore/src/vespa/searchcore/proton/index/memoryindexwrapper.h4
-rw-r--r--searchcorespi/src/vespa/searchcorespi/index/imemoryindex.h2
-rw-r--r--searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp8
-rw-r--r--searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h2
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/memoryindex.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/memoryindex.h3
6 files changed, 10 insertions, 11 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/index/memoryindexwrapper.h b/searchcore/src/vespa/searchcore/proton/index/memoryindexwrapper.h
index 9f5c2290d2f..6c57298dc43 100644
--- a/searchcore/src/vespa/searchcore/proton/index/memoryindexwrapper.h
+++ b/searchcore/src/vespa/searchcore/proton/index/memoryindexwrapper.h
@@ -84,8 +84,8 @@ public:
_index.commit(onWriteDone);
_serialNum.store(serialNum, std::memory_order_relaxed);
}
- void wipeHistory(const search::index::Schema &schema) override {
- _index.wipeHistory(schema);
+ void pruneRemovedFields(const search::index::Schema &schema) override {
+ _index.pruneRemovedFields(schema);
}
void flushToDisk(const vespalib::string &flushDir, uint32_t docIdLimit, SerialNum serialNum) override;
};
diff --git a/searchcorespi/src/vespa/searchcorespi/index/imemoryindex.h b/searchcorespi/src/vespa/searchcorespi/index/imemoryindex.h
index c8baaf9ca13..cdb94bf7a19 100644
--- a/searchcorespi/src/vespa/searchcorespi/index/imemoryindex.h
+++ b/searchcorespi/src/vespa/searchcorespi/index/imemoryindex.h
@@ -77,7 +77,7 @@ struct IMemoryIndex : public searchcorespi::IndexSearchable {
uint32_t docIdLimit,
search::SerialNum serialNum) = 0;
- virtual void wipeHistory(const search::index::Schema &schema) = 0;
+ virtual void pruneRemovedFields(const search::index::Schema &schema) = 0;
virtual search::index::Schema::SP getWipeTimeSchema() const = 0;
};
diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp
index dfe5eaf67a1..c9329a20bc9 100644
--- a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp
+++ b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp
@@ -212,7 +212,7 @@ IndexMaintainer::updateIndexSchemas(IIndexCollection &coll,
if (d == NULL) {
IMemoryIndex *const m = dynamic_cast<IMemoryIndex *>(&is);
if (m != NULL) {
- m->wipeHistory(schema);
+ m->pruneRemovedFields(schema);
}
continue;
}
@@ -871,7 +871,7 @@ IndexMaintainer::IndexMaintainer(const IndexMaintainerConfig &config,
sourceList->setCurrentIndex(_current_index_id);
_source_list = std::move(sourceList);
_fusion_spec = spec;
- _ctx.getThreadingService().master().execute(makeLambdaTask([this,&config]() {internalWipeHistory(_schema, config.getSerialNum()); }));
+ _ctx.getThreadingService().master().execute(makeLambdaTask([this,&config]() {pruneRemovedFields(_schema, config.getSerialNum()); }));
_ctx.getThreadingService().master().sync();
}
@@ -1187,7 +1187,7 @@ void
IndexMaintainer::setSchema(const Schema & schema, SerialNum serialNum)
{
assert(_ctx.getThreadingService().master().isCurrentThread());
- internalWipeHistory(schema, serialNum);
+ pruneRemovedFields(schema, serialNum);
IMemoryIndex::SP new_index(_operations.createMemoryIndex(schema, _current_serial_num));
SetSchemaArgs args;
@@ -1202,7 +1202,7 @@ IndexMaintainer::setSchema(const Schema & schema, SerialNum serialNum)
}
void
-IndexMaintainer::internalWipeHistory(const Schema &schema, SerialNum wipeSerial)
+IndexMaintainer::pruneRemovedFields(const Schema &schema, SerialNum wipeSerial)
{
assert(_ctx.getThreadingService().master().isCurrentThread());
ISearchableIndexCollection::SP new_source_list;
diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h
index 3d28bf72b94..dcedd97abcb 100644
--- a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h
+++ b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h
@@ -287,7 +287,7 @@ class IndexMaintainer : public IIndexManager,
bool makeSureAllRemainingWarmupIsDone(ISearchableIndexCollection::SP keepAlive);
void scheduleCommit();
void commit();
- void internalWipeHistory(const Schema &schema, SerialNum wipeSerial);
+ void pruneRemovedFields(const Schema &schema, SerialNum wipeSerial);
public:
IndexMaintainer(const IndexMaintainer &) = delete;
diff --git a/searchlib/src/vespa/searchlib/memoryindex/memoryindex.cpp b/searchlib/src/vespa/searchlib/memoryindex/memoryindex.cpp
index 34021ebeab6..b6aff679921 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/memoryindex.cpp
+++ b/searchlib/src/vespa/searchlib/memoryindex/memoryindex.cpp
@@ -257,7 +257,7 @@ MemoryIndex::getMemoryUsage() const
}
void
-MemoryIndex::wipeHistory(const Schema &schema)
+MemoryIndex::pruneRemovedFields(const Schema &schema)
{
LockGuard lock(_lock);
if (_wipeTimeSchema.get() == NULL) {
diff --git a/searchlib/src/vespa/searchlib/memoryindex/memoryindex.h b/searchlib/src/vespa/searchlib/memoryindex/memoryindex.h
index 10ab298bd80..40368bc8624 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/memoryindex.h
+++ b/searchlib/src/vespa/searchlib/memoryindex/memoryindex.h
@@ -162,8 +162,7 @@ public:
return _dictionary.getNumUniqueWords();
}
- void
- wipeHistory(const index::Schema &schema);
+ void pruneRemovedFields(const index::Schema &schema);
index::Schema::SP getWipeTimeSchema() const;