diff options
author | Henning Baldersheim <balder@oath.com> | 2019-07-23 21:03:27 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@oath.com> | 2019-07-23 21:03:27 +0000 |
commit | 208cf078445bdb50a47f8a3c6f03ff2713b2217d (patch) | |
tree | 213f3c4a3fc51e17e288541ae8248aea77a988de | |
parent | 01862bd9cb0608a3cda36800eb73e6dc9bfa5157 (diff) |
Add more logging related to compaction and reenumeration.
-rw-r--r-- | searchlib/src/vespa/searchlib/attribute/enumattribute.hpp | 8 | ||||
-rw-r--r-- | searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/enumattribute.hpp b/searchlib/src/vespa/searchlib/attribute/enumattribute.hpp index 075eaceb11b..047de7de3c7 100644 --- a/searchlib/src/vespa/searchlib/attribute/enumattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/enumattribute.hpp @@ -101,13 +101,18 @@ EnumAttribute<B>::insertNewUniqueValues(EnumStoreBase::IndexVector & newIndexes) do { // perform compaction on EnumStore if necessary if (extraBytesNeeded > this->_enumStore.getRemaining() || - this->_enumStore.getPendingCompact()) { + this->_enumStore.getPendingCompact()) + { + this->logEnumStoreEvent("enumstorecompact", "reserve"); this->removeAllOldGenerations(); this->_enumStore.clearPendingCompact(); EnumIndexMap old2New(this->_enumStore.getNumUniques()*3); + this->logEnumStoreEvent("enumstorecompact", "start"); if (!this->_enumStore.performCompaction(extraBytesNeeded, old2New)) { + this->logEnumStoreEvent("enumstorecompact", "failed_compact"); // fallback to resize strategy this->_enumStore.fallbackResize(extraBytesNeeded); + this->logEnumStoreEvent("enumstorecompact", "fallbackresize_complete"); if (extraBytesNeeded > this->_enumStore.getRemaining()) { HDR_ABORT("Cannot fallbackResize enumStore"); } @@ -120,6 +125,7 @@ EnumAttribute<B>::insertNewUniqueValues(EnumStoreBase::IndexVector & newIndexes) for (auto & data : this->_changes) { data._enumScratchPad = ChangeBase::UNSET_ENUM; } + this->logEnumStoreEvent("enumstorecompact", "complete"); } } while (0); diff --git a/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp b/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp index 4f5cd3f4276..3c248342696 100644 --- a/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/singleenumattribute.hpp @@ -137,8 +137,10 @@ template <typename B> void SingleValueEnumAttribute<B>::reEnumerate(const EnumIndexMap & old2New) { + this->logEnumStoreEvent("reenumerate", "reserved"); auto newIndexes = std::make_unique<vespalib::Array<EnumIndex>>(); newIndexes->reserve(_enumIndices.capacity()); + this->logEnumStoreEvent("reenumerate", "start"); for (uint32_t i = 0; i < _enumIndices.size(); ++i) { EnumIndex oldIdx = _enumIndices[i]; EnumIndex newIdx; @@ -154,6 +156,7 @@ SingleValueEnumAttribute<B>::reEnumerate(const EnumIndexMap & old2New) _enumIndices.replaceVector(std::move(newIndexes)); } this->logEnumStoreEvent("compactfixup", "complete"); + this->logEnumStoreEvent("reenumerate", "complete"); } template <typename B> |