summaryrefslogtreecommitdiffstats
path: root/searchcorespi
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@yahoo-inc.com>2017-04-27 11:04:37 +0000
committerTor Egge <Tor.Egge@yahoo-inc.com>2017-04-27 11:04:37 +0000
commit13ce3e2b2ed8783784dc3ce34c95875724c9dcef (patch)
tree7896f894467f270b3d074250289028970b9e9e90 /searchcorespi
parent0be5796b9acce73035fa733a2307ce0515749faf (diff)
Remove further traces of wipeHistory:
wipeSerial, wipeGen => serialNum, pruneGen
Diffstat (limited to 'searchcorespi')
-rw-r--r--searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp16
-rw-r--r--searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h20
-rw-r--r--searchcorespi/src/vespa/searchcorespi/index/indexwriteutilities.cpp6
-rw-r--r--searchcorespi/src/vespa/searchcorespi/index/indexwriteutilities.h2
4 files changed, 22 insertions, 22 deletions
diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp
index d3c622c6885..c9212502abd 100644
--- a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp
+++ b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp
@@ -191,17 +191,17 @@ IndexMaintainer::reopenDiskIndexes(ISearchableIndexCollection &coll)
void
IndexMaintainer::updateDiskIndexSchema(const vespalib::string &indexDir,
const Schema &schema,
- SerialNum wipeSerial)
+ SerialNum serialNum)
{
// Called by a flush worker thread OR document db executor thread
LockGuard lock(_schemaUpdateLock);
- IndexWriteUtilities::updateDiskIndexSchema(indexDir, schema, wipeSerial);
+ IndexWriteUtilities::updateDiskIndexSchema(indexDir, schema, serialNum);
}
void
IndexMaintainer::updateIndexSchemas(IIndexCollection &coll,
const Schema &schema,
- SerialNum wipeSerial)
+ SerialNum serialNum)
{
assert(_ctx.getThreadingService().master().isCurrentThread());
uint32_t count = coll.getSourceCount();
@@ -216,7 +216,7 @@ IndexMaintainer::updateIndexSchemas(IIndexCollection &coll,
}
continue;
}
- updateDiskIndexSchema(d->getIndexDir(), schema, wipeSerial);
+ updateDiskIndexSchema(d->getIndexDir(), schema, serialNum);
}
}
@@ -833,7 +833,7 @@ IndexMaintainer::IndexMaintainer(const IndexMaintainerConfig &config,
_operations(operations)
{
// Called by document db init executor thread
- _changeGens.bumpWipeGen();
+ _changeGens.bumpPruneGen();
DiskIndexCleaner::clean(_base_dir, *_active_indexes);
FusionSpec spec = IndexReadUtilities::readFusionSpec(_base_dir);
_next_id = 1 + (spec.flush_ids.empty() ? spec.last_fusion_id : spec.flush_ids.back());
@@ -1202,17 +1202,17 @@ IndexMaintainer::setSchema(const Schema & schema, SerialNum serialNum)
}
void
-IndexMaintainer::pruneRemovedFields(const Schema &schema, SerialNum wipeSerial)
+IndexMaintainer::pruneRemovedFields(const Schema &schema, SerialNum serialNum)
{
assert(_ctx.getThreadingService().master().isCurrentThread());
ISearchableIndexCollection::SP new_source_list;
IIndexCollection::SP coll = getSourceCollection();
- updateIndexSchemas(*coll, schema, wipeSerial);
+ updateIndexSchemas(*coll, schema, serialNum);
updateActiveFusionPrunedSchema(schema);
{
LockGuard state_lock(_state_lock);
LockGuard lock(_index_update_lock);
- _changeGens.bumpWipeGen();
+ _changeGens.bumpPruneGen();
}
{
LockGuard state_lock(_state_lock);
diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h
index b10ee7cc091..00d6de64e46 100644
--- a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h
+++ b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h
@@ -73,12 +73,12 @@ class IndexMaintainer : public IIndexManager,
class ChangeGens
{
public:
- uint32_t _wipeGen;
+ uint32_t _pruneGen;
- ChangeGens() : _wipeGen(0) { }
- void bumpWipeGen(void) { ++_wipeGen; }
- bool operator==(const ChangeGens &rhs) const { return _wipeGen == rhs._wipeGen; }
- bool operator!=(const ChangeGens &rhs) const { return _wipeGen != rhs._wipeGen; }
+ ChangeGens() : _pruneGen(0) { }
+ void bumpPruneGen(void) { ++_pruneGen; }
+ bool operator==(const ChangeGens &rhs) const { return _pruneGen == rhs._pruneGen; }
+ bool operator!=(const ChangeGens &rhs) const { return _pruneGen != rhs._pruneGen; }
};
typedef std::vector<uint32_t> FlushIds;
@@ -134,8 +134,8 @@ class IndexMaintainer : public IIndexManager,
*
* Things get more complicated when handling multiple kinds of overlapping
* flush operations, e.g. dump from memory to disk, fusion, schema changes
- * and wipe of old fields, since this will trigger more retries for some
- * of the operations.
+ * and pruning of removed fields, since this will trigger more retries for
+ * some of the operations.
*/
vespalib::Lock _state_lock; // Outer lock (SL)
vespalib::Lock _index_update_lock; // Inner lock (IUL)
@@ -168,12 +168,12 @@ class IndexMaintainer : public IIndexManager,
void
updateDiskIndexSchema(const vespalib::string &indexDir,
const Schema &schema,
- SerialNum wipeSerial);
+ SerialNum serialNum);
void
updateIndexSchemas(IIndexCollection &coll,
const Schema &schema,
- SerialNum wipeSerial);
+ SerialNum serialNum);
void updateActiveFusionPrunedSchema(const Schema &schema);
void deactivateDiskIndexes(vespalib::string indexDir);
@@ -287,7 +287,7 @@ class IndexMaintainer : public IIndexManager,
bool makeSureAllRemainingWarmupIsDone(ISearchableIndexCollection::SP keepAlive);
void scheduleCommit();
void commit();
- void pruneRemovedFields(const Schema &schema, SerialNum wipeSerial);
+ void pruneRemovedFields(const Schema &schema, SerialNum serialNum);
public:
IndexMaintainer(const IndexMaintainer &) = delete;
diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexwriteutilities.cpp b/searchcorespi/src/vespa/searchcorespi/index/indexwriteutilities.cpp
index 862c65c890e..9a2f5fa58b8 100644
--- a/searchcorespi/src/vespa/searchcorespi/index/indexwriteutilities.cpp
+++ b/searchcorespi/src/vespa/searchcorespi/index/indexwriteutilities.cpp
@@ -124,7 +124,7 @@ IndexWriteUtilities::writeSourceSelector(FixedSourceSelector::SaveInfo &
void
IndexWriteUtilities::updateDiskIndexSchema(const vespalib::string &indexDir,
const Schema &schema,
- SerialNum wipeSerial)
+ SerialNum serialNum)
{
vespalib::string schemaName = IndexDiskLayout::getSchemaFileName(indexDir);
Schema oldSchema;
@@ -142,9 +142,9 @@ IndexWriteUtilities::updateDiskIndexSchema(const vespalib::string &indexDir,
if (*newSchema == oldSchema) {
return;
}
- if (wipeSerial != noSerialNumHigh) {
+ if (serialNum != noSerialNumHigh) {
SerialNum oldSerial = IndexReadUtilities::readSerialNum(indexDir);
- if (oldSerial >= wipeSerial) {
+ if (oldSerial >= serialNum) {
return;
}
}
diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexwriteutilities.h b/searchcorespi/src/vespa/searchcorespi/index/indexwriteutilities.h
index c08b850bd6f..3c6ec9fabc2 100644
--- a/searchcorespi/src/vespa/searchcorespi/index/indexwriteutilities.h
+++ b/searchcorespi/src/vespa/searchcorespi/index/indexwriteutilities.h
@@ -37,7 +37,7 @@ struct IndexWriteUtilities
static void
updateDiskIndexSchema(const vespalib::string &indexDir,
const search::index::Schema &schema,
- search::SerialNum wipeSerial);
+ search::SerialNum serialNum);
};
} // namespace index