From 2915ddaa1c176a47d6c62d3b25bad9bb369c1448 Mon Sep 17 00:00:00 2001 From: Arne Juul Date: Wed, 20 Jun 2018 10:17:42 +0200 Subject: add and use HDR_ABORT instead --- searchlib/src/tests/attribute/benchmark/attributeupdater.h | 5 +++-- searchlib/src/vespa/searchlib/attribute/attrvector.hpp | 3 ++- searchlib/src/vespa/searchlib/attribute/enumattribute.hpp | 3 ++- searchlib/src/vespa/searchlib/attribute/enumstore.hpp | 5 +++-- searchlib/src/vespa/searchlib/btree/btreeiterator.hpp | 7 ++++--- 5 files changed, 14 insertions(+), 9 deletions(-) (limited to 'searchlib') 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 #include #include #include @@ -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 #include #include @@ -130,7 +131,7 @@ template void NumericDirectAttribute::onCommit() { B::_changes.clear(); - LOG_ABORT("should not be reached"); + HDR_ABORT("should not be reached"); } template 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 #include #include @@ -109,7 +110,7 @@ EnumAttribute::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 #include #include #include @@ -151,7 +152,7 @@ EnumStoreT::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(activeBufferId, offset)); @@ -256,7 +257,7 @@ EnumStoreT::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 #include namespace search { @@ -557,17 +558,17 @@ BTreeIteratorBase:: 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; -- cgit v1.2.3