diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2019-07-24 10:04:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-24 10:04:33 +0200 |
commit | 1745a22bb5fb717c9e0c8505abac7f7651b091ff (patch) | |
tree | ef81466fc55f4797dcaa2a69952ff1de4794171f | |
parent | 878ca29c4b220004bf9c1cb55f2ea66a7a78974d (diff) | |
parent | 208cf078445bdb50a47f8a3c6f03ff2713b2217d (diff) |
Merge pull request #10081 from vespa-engine/balder/add-some-more-logging-to-identify-random-issues
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> |