diff options
author | Arne Juul <arnej@yahoo-inc.com> | 2018-06-20 10:17:42 +0200 |
---|---|---|
committer | Arne Juul <arnej@yahoo-inc.com> | 2018-06-20 10:17:42 +0200 |
commit | 2915ddaa1c176a47d6c62d3b25bad9bb369c1448 (patch) | |
tree | 3706af052360b9ef219d34ebf041d788cb92dd3d /searchlib | |
parent | 44fc1380b66867958f89c47ac8752926b3787a4d (diff) |
add and use HDR_ABORT instead
Diffstat (limited to 'searchlib')
5 files changed, 14 insertions, 9 deletions
diff --git a/searchlib/src/tests/attribute/benchmark/attributeupdater.h b/searchlib/src/tests/attribute/benchmark/attributeupdater.h index 1b493dabcc7..1dad2cb563d 100644 --- a/searchlib/src/tests/attribute/benchmark/attributeupdater.h +++ b/searchlib/src/tests/attribute/benchmark/attributeupdater.h @@ -2,6 +2,7 @@ #pragma once +#include <vespa/vespalib/util/hdr_abort.h> #include <vespa/searchlib/util/randomgenerator.h> #include <vespa/searchlib/util/runnable.h> #include <vespa/searchlib/attribute/attribute.h> @@ -25,7 +26,7 @@ public: if (!rc) { std::cout << "Assert " << _totalCnt << " failed: \"" << str << "\" (" << file << ":" << line << ")" << std::endl; - LOG_ABORT("should not be reached"); + HDR_ABORT("should not be reached"); } return true; } @@ -39,7 +40,7 @@ public: std::cout << aStr << ": " << a << std::endl; std::cout << bStr << ": " << b << std::endl; std::cout << "(" << file << ":" << line << ")" << std::endl; - LOG_ABORT("should not be reached"); + HDR_ABORT("should not be reached"); } return true; } diff --git a/searchlib/src/vespa/searchlib/attribute/attrvector.hpp b/searchlib/src/vespa/searchlib/attribute/attrvector.hpp index 08b54e9d561..565801b1b0c 100644 --- a/searchlib/src/vespa/searchlib/attribute/attrvector.hpp +++ b/searchlib/src/vespa/searchlib/attribute/attrvector.hpp @@ -2,6 +2,7 @@ #pragma once #include "attrvector.h" +#include <vespa/vespalib/util/hdr_abort.h> #include <vespa/fastlib/io/bufferedfile.h> #include <vespa/searchlib/util/filekit.h> @@ -130,7 +131,7 @@ template <typename B> void NumericDirectAttribute<B>::onCommit() { B::_changes.clear(); - LOG_ABORT("should not be reached"); + HDR_ABORT("should not be reached"); } template <typename B> diff --git a/searchlib/src/vespa/searchlib/attribute/enumattribute.hpp b/searchlib/src/vespa/searchlib/attribute/enumattribute.hpp index c3cd9d56717..1bca7b9b9e3 100644 --- a/searchlib/src/vespa/searchlib/attribute/enumattribute.hpp +++ b/searchlib/src/vespa/searchlib/attribute/enumattribute.hpp @@ -2,6 +2,7 @@ #pragma once +#include <vespa/vespalib/util/hdr_abort.h> #include <vespa/searchlib/attribute/enumattribute.h> #include <vespa/searchlib/attribute/enumstore.hpp> @@ -109,7 +110,7 @@ EnumAttribute<B>::insertNewUniqueValues(EnumStoreBase::IndexVector & newIndexes) this->_enumStore.fallbackResize(extraBytesNeeded); if (extraBytesNeeded > this->_enumStore.getRemaining()) { fprintf(stderr, "Cannot fallbackResize enumStore\n"); - LOG_ABORT("should not be reached"); + HDR_ABORT("should not be reached"); } break; // fallback resize performed instead of compaction. } diff --git a/searchlib/src/vespa/searchlib/attribute/enumstore.hpp b/searchlib/src/vespa/searchlib/attribute/enumstore.hpp index 95358beb11d..3a2ac451712 100644 --- a/searchlib/src/vespa/searchlib/attribute/enumstore.hpp +++ b/searchlib/src/vespa/searchlib/attribute/enumstore.hpp @@ -5,6 +5,7 @@ #include "enumstore.h" #include "enumcomparator.h" +#include <vespa/vespalib/util/hdr_abort.h> #include <vespa/searchlib/btree/btreenode.hpp> #include <vespa/searchlib/btree/btreenodestore.hpp> #include <vespa/searchlib/btree/btreenodeallocator.hpp> @@ -151,7 +152,7 @@ EnumStoreT<EntryType>::deserialize(const void *src, datastore::BufferState & buffer = _store.getBufferState(activeBufferId); uint32_t entrySize(alignEntrySize(EntryBase::size() + sz)); if (buffer.remaining() < entrySize) { - LOG_ABORT("should not be reached"); // not enough space + HDR_ABORT("should not be reached"); // not enough space } uint64_t offset = buffer.size(); char *dst(_store.getBufferEntry<char>(activeBufferId, offset)); @@ -256,7 +257,7 @@ EnumStoreT<EntryType>::addEnum(Type value, buffer._deadElems, entrySize); #endif if (buffer.remaining() < entrySize) { - LOG_ABORT("should not be reached"); // not enough space + HDR_ABORT("should not be reached"); // not enough space } // check if already present diff --git a/searchlib/src/vespa/searchlib/btree/btreeiterator.hpp b/searchlib/src/vespa/searchlib/btree/btreeiterator.hpp index 33bc228653d..18635dda546 100644 --- a/searchlib/src/vespa/searchlib/btree/btreeiterator.hpp +++ b/searchlib/src/vespa/searchlib/btree/btreeiterator.hpp @@ -5,6 +5,7 @@ #include "btreeiterator.h" #include "btreeaggregator.h" #include "btreenode.hpp" +#include <vespa/vespalib/util/hdr_abort.h> #include <vespa/vespalib/stllike/asciistream.h> namespace search { @@ -557,17 +558,17 @@ BTreeIteratorBase<KeyT, DataT, AggrT, INTERNAL_SLOTS, LEAF_SLOTS, PATH_SIZE>:: identical(const BTreeIteratorBase &rhs) const { if (_pathSize != rhs._pathSize || _leaf != rhs._leaf) { - LOG_ABORT("should not be reached"); + HDR_ABORT("should not be reached"); return false; } for (uint32_t level = 0; level < _pathSize; ++level) { if (_path[level] != rhs._path[level]) { - LOG_ABORT("should not be reached"); + HDR_ABORT("should not be reached"); return false; } } if (_leafRoot != rhs._leafRoot) { - LOG_ABORT("should not be reached"); + HDR_ABORT("should not be reached"); return false; } return true; |