aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/src/vespa/config/frt/frtconfigresponsev3.cpp2
-rw-r--r--document/src/vespa/document/datatype/primitivedatatype.cpp4
-rw-r--r--document/src/vespa/document/repo/document_type_repo_factory.cpp3
-rw-r--r--document/src/vespa/document/select/operator.cpp7
-rw-r--r--eval/src/vespa/eval/tensor/wrapped_simple_tensor.cpp3
-rw-r--r--juniper/src/vespa/juniper/SummaryConfig.h3
-rw-r--r--juniper/src/vespa/juniper/appender.h3
-rw-r--r--juniper/src/vespa/juniper/queryparser.cpp2
-rw-r--r--persistence/src/vespa/persistence/dummyimpl/dummypersistence.cpp4
-rw-r--r--persistence/src/vespa/persistence/spi/read_consistency.cpp6
-rw-r--r--searchcore/src/tests/proton/docsummary/docsummary.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp3
-rw-r--r--searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp2
-rw-r--r--searchlib/src/tests/diskindex/pagedict4/pagedict4_hugeword_cornercase_test.cpp3
-rw-r--r--searchlib/src/tests/util/ioerrorhandler/ioerrorhandler_test.cpp12
-rw-r--r--searchlib/src/tests/util/sigbushandler/sigbushandler_test.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/aggregation/hitsaggregationresult.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/attributevector.cpp5
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumattribute.hpp3
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumstore.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/attribute/enumstore.hpp4
-rw-r--r--searchlib/src/vespa/searchlib/bitcompression/pagedict4.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/bitcompression/posocccompression.cpp7
-rw-r--r--searchlib/src/vespa/searchlib/btree/btreeiterator.hpp3
-rw-r--r--searchlib/src/vespa/searchlib/docstore/filechunk.cpp2
-rw-r--r--storage/src/vespa/storage/distributor/maintenance/maintenancescheduler.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/data/slime/binary_format.cpp4
-rw-r--r--vespalib/src/vespa/vespalib/data/slime/inject.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/data/slime/json_format.cpp2
32 files changed, 47 insertions, 67 deletions
diff --git a/config/src/vespa/config/frt/frtconfigresponsev3.cpp b/config/src/vespa/config/frt/frtconfigresponsev3.cpp
index 379ebbd1803..405391d99b6 100644
--- a/config/src/vespa/config/frt/frtconfigresponsev3.cpp
+++ b/config/src/vespa/config/frt/frtconfigresponsev3.cpp
@@ -63,7 +63,7 @@ FRTConfigResponseV3::readConfigValue() const
if (consumedSize == 0) {
std::string json(make_json(*payloadData, true));
LOG(error, "Error decoding JSON. Consumed size: %lu, uncompressed size: %u, compression type: %s, assumed uncompressed size(%u), compressed size: %u, slime(%s)", consumedSize, data.size, compressionTypeToString(info.compressionType).c_str(), info.uncompressedSize, ((*_returnValues)[1]._data._len), json.c_str());
- assert(false);
+ LOG_ABORT("Error decoding JSON");
}
}
if (LOG_WOULD_LOG(spam)) {
diff --git a/document/src/vespa/document/datatype/primitivedatatype.cpp b/document/src/vespa/document/datatype/primitivedatatype.cpp
index aa8879e299e..3755ebc370e 100644
--- a/document/src/vespa/document/datatype/primitivedatatype.cpp
+++ b/document/src/vespa/document/datatype/primitivedatatype.cpp
@@ -67,10 +67,8 @@ PrimitiveDataType::createFieldValue() const
case T_BYTE: return FieldValue::UP(new ByteFieldValue);
case T_PREDICATE: return FieldValue::UP(new PredicateFieldValue);
case T_TENSOR: return std::make_unique<TensorFieldValue>();
- LOG_ABORT("should not be reached");
}
- assert(!"getId() returned value out of range");
- LOG_ABORT("should not be reached");
+ LOG_ABORT("getId() returned value out of range");
}
void
diff --git a/document/src/vespa/document/repo/document_type_repo_factory.cpp b/document/src/vespa/document/repo/document_type_repo_factory.cpp
index e60c4c976a9..becf4face92 100644
--- a/document/src/vespa/document/repo/document_type_repo_factory.cpp
+++ b/document/src/vespa/document/repo/document_type_repo_factory.cpp
@@ -24,8 +24,7 @@ public:
EmptyFactoryCheck::~EmptyFactoryCheck()
{
if (!DocumentTypeRepoFactory::empty()) {
- std::cerr << "DocumentTypeRepoFactory not empty at shutdown" << std::endl;
- LOG_ABORT("should not be reached");
+ LOG_ABORT("DocumentTypeRepoFactory not empty at shutdown");
}
}
diff --git a/document/src/vespa/document/select/operator.cpp b/document/src/vespa/document/select/operator.cpp
index b1c1c77ab4e..b2e7ddd82b8 100644
--- a/document/src/vespa/document/select/operator.cpp
+++ b/document/src/vespa/document/select/operator.cpp
@@ -6,6 +6,9 @@
#include <vespa/vespalib/stllike/hash_map.hpp>
#include <cassert>
+#include <vespa/log/log.h>
+LOG_SETUP(".document.select.operator");
+
namespace document::select {
Operator::OperatorMap Operator::_operators;
@@ -15,7 +18,7 @@ Operator::Operator(const vespalib::stringref & name)
{
OperatorMap::iterator it = _operators.find(name);
if (it != _operators.end()) {
- assert(false);
+ LOG_ABORT("unknown operator, should not happen");
}
_operators[_name] = this;
}
@@ -25,7 +28,7 @@ Operator::get(const vespalib::stringref & name)
{
OperatorMap::iterator it = _operators.find(name);
if (it == _operators.end()) {
- assert(false);
+ LOG_ABORT("unknown operator, should not happen");
}
return *it->second;
}
diff --git a/eval/src/vespa/eval/tensor/wrapped_simple_tensor.cpp b/eval/src/vespa/eval/tensor/wrapped_simple_tensor.cpp
index 84ed393823e..5c6c70099ad 100644
--- a/eval/src/vespa/eval/tensor/wrapped_simple_tensor.cpp
+++ b/eval/src/vespa/eval/tensor/wrapped_simple_tensor.cpp
@@ -63,21 +63,18 @@ Tensor::UP
WrappedSimpleTensor::apply(const CellFunction &) const
{
LOG_ABORT("should not be reached");
- return Tensor::UP();
}
Tensor::UP
WrappedSimpleTensor::join(join_fun_t, const Tensor &) const
{
LOG_ABORT("should not be reached");
- return Tensor::UP();
}
Tensor::UP
WrappedSimpleTensor::reduce(join_fun_t, const std::vector<vespalib::string> &) const
{
LOG_ABORT("should not be reached");
- return Tensor::UP();
}
} // namespace vespalib::tensor
diff --git a/juniper/src/vespa/juniper/SummaryConfig.h b/juniper/src/vespa/juniper/SummaryConfig.h
index 4a6a56fad9c..96023b9523b 100644
--- a/juniper/src/vespa/juniper/SummaryConfig.h
+++ b/juniper/src/vespa/juniper/SummaryConfig.h
@@ -6,8 +6,7 @@
enum ConfigFlag {
CF_OFF,
CF_ON,
- CF_AUTO,
- CF_MAXVAL
+ CF_AUTO
};
diff --git a/juniper/src/vespa/juniper/appender.h b/juniper/src/vespa/juniper/appender.h
index 3afb8b1494d..a74b038c5f1 100644
--- a/juniper/src/vespa/juniper/appender.h
+++ b/juniper/src/vespa/juniper/appender.h
@@ -118,9 +118,6 @@ public:
_sumconf->highlight_off()[0] == '<' ||
_sumconf->dots()[0] == '<');
break;
- default:
- HDR_ABORT("should not be reached");
- break;
}
if (_sumconf->preserve_white_space() == CF_ON) {
diff --git a/juniper/src/vespa/juniper/queryparser.cpp b/juniper/src/vespa/juniper/queryparser.cpp
index 6214c7d09e5..cf300970fda 100644
--- a/juniper/src/vespa/juniper/queryparser.cpp
+++ b/juniper/src/vespa/juniper/queryparser.cpp
@@ -181,7 +181,7 @@ QueryItem* QueryParser::ParseExpr()
LOG(debug, "constraint operator %s - value %d", op.c_str(), p1);
break;
default:
- assert(false);
+ LOG_ABORT("should not reach here");
}
next();
if (!match("(", true)) return NULL;
diff --git a/persistence/src/vespa/persistence/dummyimpl/dummypersistence.cpp b/persistence/src/vespa/persistence/dummyimpl/dummypersistence.cpp
index 0ce3cbe8b3d..d3883744229 100644
--- a/persistence/src/vespa/persistence/dummyimpl/dummypersistence.cpp
+++ b/persistence/src/vespa/persistence/dummyimpl/dummypersistence.cpp
@@ -188,7 +188,7 @@ BucketContent::insert(DocEntry::SP e)
"Was trying to insert %s.",
it->entry->toString().c_str(),
e->toString().c_str());
- assert(false);
+ LOG_ABORT("should not reach here");
}
}
}
@@ -964,7 +964,7 @@ DummyPersistence::acquireBucketWithLock(const Bucket& b) const
if (!bucketNotInUse) {
LOG(error, "Attempted to acquire %s, but it was already marked as being in use!",
b.toString().c_str());
- assert(false);
+ LOG_ABORT("should not reach here");
}
return BucketContentGuard::UP(new BucketContentGuard(ncp, *it->second));
diff --git a/persistence/src/vespa/persistence/spi/read_consistency.cpp b/persistence/src/vespa/persistence/spi/read_consistency.cpp
index d6a7abe425b..cad15a5263d 100644
--- a/persistence/src/vespa/persistence/spi/read_consistency.cpp
+++ b/persistence/src/vespa/persistence/spi/read_consistency.cpp
@@ -1,7 +1,9 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "read_consistency.h"
#include <iostream>
-#include <cassert>
+
+#include <vespa/log/log.h>
+LOG_SETUP(".persistence.spi.read_consistency");
namespace storage {
namespace spi {
@@ -17,7 +19,7 @@ operator<<(std::ostream& os, ReadConsistency consistency)
os << "WEAK";
break;
default:
- assert(false);
+ LOG_ABORT("should not reach here");
}
return os;
}
diff --git a/searchcore/src/tests/proton/docsummary/docsummary.cpp b/searchcore/src/tests/proton/docsummary/docsummary.cpp
index 1c901097812..db6116073e6 100644
--- a/searchcore/src/tests/proton/docsummary/docsummary.cpp
+++ b/searchcore/src/tests/proton/docsummary/docsummary.cpp
@@ -213,7 +213,9 @@ public:
_tuneFileDocumentDB, _hwInfo);
_configMgr.forwardConfig(b);
_configMgr.nextGeneration(0);
- if (! FastOS_File::MakeDirectory((std::string("tmpdb/") + docTypeName).c_str())) { LOG_ABORT("should not be reached"); }
+ if (! FastOS_File::MakeDirectory((std::string("tmpdb/") + docTypeName).c_str())) {
+ LOG_ABORT("should not be reached");
+ }
_ddb.reset(new DocumentDB("tmpdb", _configMgr.getConfig(), "tcp/localhost:9013", _queryLimiter, _clock,
DocTypeName(docTypeName), makeBucketSpace(),
*b->getProtonConfigSP(), *this, _summaryExecutor, _summaryExecutor,
diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.cpp b/searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.cpp
index 9b596d6e992..577d6e7edf5 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.cpp
@@ -69,7 +69,7 @@ FastS_FNET_SearchNode::FastS_FNET_SearchNode(FastS_FNET_SearchNode &&)
{
// These objects are referenced everywhere and must never be either copied nor moved,
// but as std::vector requires this to exist so we do this little trick.
- assert(false);
+ LOG_ABORT("should not reach here");
}
bool
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp
index a00ec759647..f2e4ac4905d 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp
@@ -92,8 +92,7 @@ AttributeDirectory::saveSnapInfo()
{
if (!_snapInfo.save()) {
vespalib::string dirName(getDirName());
- LOG(warning,
- "Could not save meta-info file for attribute vector '%s' to disk",
+ LOG(warning, "Could not save meta-info file for attribute vector '%s' to disk",
dirName.c_str());
LOG_ABORT("should not be reached");
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp b/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp
index 6a000973165..20306e92ea8 100644
--- a/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp
@@ -26,7 +26,6 @@ getRepo(const std::vector<IFeedView::SP> &views)
return view->getDocumentTypeRepo();
}
LOG_ABORT("should not be reached");
- return std::shared_ptr<const DocumentTypeRepo>();
}
};
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
index f91892114ea..80809d76bef 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
@@ -291,8 +291,7 @@ DocumentDBConfigManager::update(const ConfigSnapshot &snapshot)
search::index::Schema schema;
search::index::SchemaBuilder::build(*newIndexschemaConfig, schema);
if (!search::index::SchemaUtil::validateSchema(schema)) {
- LOG(error, "Cannot use bad index schema, validation failed");
- LOG_ABORT("should not be reached");
+ LOG_ABORT("Cannot use bad index schema, validation failed");
}
}
if (snapshot.isChanged<AttributesConfig>(_configId, currentGeneration)) {
diff --git a/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp b/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp
index 9ed08643def..c7dde172b9d 100644
--- a/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp
+++ b/searchlib/src/tests/attribute/searchable/attribute_searchable_adapter_test.cpp
@@ -520,7 +520,7 @@ TEST("require that attribute parallel wand works") {
} else {
fprintf(stderr, " (fast_search: %s, strict: %s)\n",
as_str(fast_search), as_str(strict));
- assert(false);
+ LOG_ABORT("should not reach here");
}
}
}
diff --git a/searchlib/src/tests/diskindex/pagedict4/pagedict4_hugeword_cornercase_test.cpp b/searchlib/src/tests/diskindex/pagedict4/pagedict4_hugeword_cornercase_test.cpp
index ea0f769cc51..8fb0e48663c 100644
--- a/searchlib/src/tests/diskindex/pagedict4/pagedict4_hugeword_cornercase_test.cpp
+++ b/searchlib/src/tests/diskindex/pagedict4/pagedict4_hugeword_cornercase_test.cpp
@@ -128,8 +128,7 @@ PostingListCounts makeCounts(uint32_t wantLen)
return counts2;
}
}
- LOG(info, "Could not calculate counts with wanted compressed length");
- LOG_ABORT("should not be reached");
+ LOG_ABORT("Could not calculate counts with wanted compressed length");
}
using StartOffset = search::bitcompression::PageDict4StartOffset;
diff --git a/searchlib/src/tests/util/ioerrorhandler/ioerrorhandler_test.cpp b/searchlib/src/tests/util/ioerrorhandler/ioerrorhandler_test.cpp
index aaa2a138353..fb1c1a356f6 100644
--- a/searchlib/src/tests/util/ioerrorhandler/ioerrorhandler_test.cpp
+++ b/searchlib/src/tests/util/ioerrorhandler/ioerrorhandler_test.cpp
@@ -213,8 +213,7 @@ TEST_F("Test that ioerror handler can process read error", Fixture)
injectErrno = EIO;
injectreadErrnoTrigger = 1;
f.file->ReadBuf(buf, fileSize);
- LOG(error, "Should never get here");
- LOG_ABORT("should not be reached");
+ LOG_ABORT("Should never get here");
} catch (std::runtime_error &e) {
LOG(info, "Caught std::runtime_error exception: %s", e.what());
EXPECT_TRUE(strstr(e.what(), "Input/output error") != nullptr);
@@ -253,8 +252,7 @@ TEST_F("Test that ioerror handler can process pread error", Fixture)
injectErrno = EIO;
injectpreadErrnoTrigger = 1;
f.file->ReadBuf(buf, fileSize, 0);
- LOG(error, "Should never get here");
- LOG_ABORT("should not be reached");
+ LOG_ABORT("Should never get here");
} catch (std::runtime_error &e) {
LOG(info, "Caught std::runtime_error exception: %s", e.what());
EXPECT_TRUE(strstr(e.what(), "Input/output error") != nullptr);
@@ -287,8 +285,7 @@ TEST_F("Test that ioerror handler can process write error", Fixture)
injectErrno = EIO;
injectwriteErrnoTrigger = 1;
f.writeTestString();
- LOG(error, "Should never get here");
- LOG_ABORT("should not be reached");
+ LOG_ABORT("Should never get here");
} catch (std::runtime_error &e) {
LOG(info, "Caught std::runtime_error exception: %s", e.what());
EXPECT_TRUE(strstr(e.what(), "Input/output error") != nullptr);
@@ -322,8 +319,7 @@ TEST_F("Test that ioerror handler can process pwrite error", Fixture)
injectErrno = EIO;
injectpwriteErrnoTrigger = 1;
f.writeTestString();
- LOG(error, "Should never get here");
- LOG_ABORT("should not be reached");
+ LOG_ABORT("Should never get here");
} catch (std::runtime_error &e) {
LOG(info, "Caught std::runtime_error exception: %s", e.what());
EXPECT_TRUE(strstr(e.what(), "Input/output error") != nullptr);
diff --git a/searchlib/src/tests/util/sigbushandler/sigbushandler_test.cpp b/searchlib/src/tests/util/sigbushandler/sigbushandler_test.cpp
index 1253cab4a74..658ad17544a 100644
--- a/searchlib/src/tests/util/sigbushandler/sigbushandler_test.cpp
+++ b/searchlib/src/tests/util/sigbushandler/sigbushandler_test.cpp
@@ -63,8 +63,7 @@ TEST("Test that sigbus handler can trap synthetic sigbus")
if (sigsetjmp(sjb, 1) == 0) {
sbh.setUnwind(&sjb);
kill(getpid(), SIGBUS);
- LOG(error, "Should never get here");
- LOG_ABORT("should not be reached");
+ LOG_ABORT("Should never get here");
}
EXPECT_TRUE(sbh.fired());
{
@@ -100,8 +99,7 @@ TEST("Test that sigbus handler can trap normal sigbus")
if (sigsetjmp(sjb, 1) == 0) {
sbh.setUnwind(&sjb);
r = *p;
- LOG(error, "Should never get here");
- LOG_ABORT("should not be reached");
+ LOG_ABORT("Should never get here");
}
EXPECT_TRUE(sbh.fired());
EXPECT_TRUE(r == '\0');
diff --git a/searchlib/src/vespa/searchlib/aggregation/hitsaggregationresult.cpp b/searchlib/src/vespa/searchlib/aggregation/hitsaggregationresult.cpp
index ac12a7a3ffd..afaf270b795 100644
--- a/searchlib/src/vespa/searchlib/aggregation/hitsaggregationresult.cpp
+++ b/searchlib/src/vespa/searchlib/aggregation/hitsaggregationresult.cpp
@@ -66,7 +66,7 @@ void
HitsAggregationResult::onAggregate(const ResultNode & result)
{
(void) result;
- assert(false);
+ LOG_ABORT("should not reach here");
}
void
diff --git a/searchlib/src/vespa/searchlib/attribute/attributevector.cpp b/searchlib/src/vespa/searchlib/attribute/attributevector.cpp
index 32e21bdd122..8b90677a1bc 100644
--- a/searchlib/src/vespa/searchlib/attribute/attributevector.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/attributevector.cpp
@@ -446,7 +446,10 @@ AttributeVector::createAttributeHeader() const {
getVersion());
}
-void AttributeVector::onSave(IAttributeSaveTarget &) { LOG_ABORT("should not be reached"); }
+void AttributeVector::onSave(IAttributeSaveTarget &)
+{
+ LOG_ABORT("should not be reached");
+}
bool
AttributeVector::hasLoadData() const {
diff --git a/searchlib/src/vespa/searchlib/attribute/enumattribute.hpp b/searchlib/src/vespa/searchlib/attribute/enumattribute.hpp
index 1bca7b9b9e3..1a2736541fb 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumattribute.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/enumattribute.hpp
@@ -109,8 +109,7 @@ EnumAttribute<B>::insertNewUniqueValues(EnumStoreBase::IndexVector & newIndexes)
// fallback to resize strategy
this->_enumStore.fallbackResize(extraBytesNeeded);
if (extraBytesNeeded > this->_enumStore.getRemaining()) {
- fprintf(stderr, "Cannot fallbackResize enumStore\n");
- HDR_ABORT("should not be reached");
+ HDR_ABORT("Cannot fallbackResize enumStore");
}
break; // fallback resize performed instead of compaction.
}
diff --git a/searchlib/src/vespa/searchlib/attribute/enumstore.cpp b/searchlib/src/vespa/searchlib/attribute/enumstore.cpp
index e0f46ffe111..3a8f1ad8de5 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumstore.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/enumstore.cpp
@@ -132,8 +132,7 @@ EnumStoreT<StringEntryType>::deserialize(const void *src,
datastore::BufferState & buffer = _store.getBufferState(activeBufferId);
uint32_t entrySize(alignEntrySize(EntryBase::size() + sz));
if (buffer.remaining() < entrySize) {
- fprintf(stderr, "Out of enumstore bufferspace\n");
- LOG_ABORT("should not be reached"); // not enough space
+ LOG_ABORT("Out of enumstore bufferspace");
}
uint64_t offset = buffer.size();
char *dst(_store.getBufferEntry<char>(activeBufferId, offset));
diff --git a/searchlib/src/vespa/searchlib/attribute/enumstore.hpp b/searchlib/src/vespa/searchlib/attribute/enumstore.hpp
index 3a2ac451712..54100bafa1e 100644
--- a/searchlib/src/vespa/searchlib/attribute/enumstore.hpp
+++ b/searchlib/src/vespa/searchlib/attribute/enumstore.hpp
@@ -152,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) {
- HDR_ABORT("should not be reached"); // not enough space
+ HDR_ABORT("not enough space");
}
uint64_t offset = buffer.size();
char *dst(_store.getBufferEntry<char>(activeBufferId, offset));
@@ -257,7 +257,7 @@ EnumStoreT<EntryType>::addEnum(Type value,
buffer._deadElems, entrySize);
#endif
if (buffer.remaining() < entrySize) {
- HDR_ABORT("should not be reached"); // not enough space
+ HDR_ABORT("not enough space");
}
// check if already present
diff --git a/searchlib/src/vespa/searchlib/bitcompression/pagedict4.cpp b/searchlib/src/vespa/searchlib/bitcompression/pagedict4.cpp
index 76f0325feae..23fcfb0b719 100644
--- a/searchlib/src/vespa/searchlib/bitcompression/pagedict4.cpp
+++ b/searchlib/src/vespa/searchlib/bitcompression/pagedict4.cpp
@@ -1184,8 +1184,7 @@ lookup(const vespalib::stringref &key)
}
break; // key < counts
}
- LOG(error, "FATAL: Missing L7 entry for overflow entry");
- LOG_ABORT("should not be reached"); // counts < key, should not happen (missing L7 entry)
+ LOG_ABORT("FATAL: Missing L7 entry for overflow entry"); // counts < key, should not happen (missing L7 entry)
} else {
bool l6NotLessThanKey = !(word < key);
if (l6NotLessThanKey)
diff --git a/searchlib/src/vespa/searchlib/bitcompression/posocccompression.cpp b/searchlib/src/vespa/searchlib/bitcompression/posocccompression.cpp
index e06c675be94..65b7b236525 100644
--- a/searchlib/src/vespa/searchlib/bitcompression/posocccompression.cpp
+++ b/searchlib/src/vespa/searchlib/bitcompression/posocccompression.cpp
@@ -179,8 +179,7 @@ PosOccFieldParams::readHeader(const vespalib::GenericHeader &header,
_hasElementWeights = true;
break;
default:
- LOG(error, "Bad collection type when reading field param in header");
- LOG_ABORT("should not be reached");
+ LOG_ABORT("Bad collection type when reading field param in header");
}
_avgElemLen = header.getTag(avgElemLenKey).asInteger();
}
@@ -206,9 +205,7 @@ PosOccFieldParams::writeHeader(vespalib::GenericHeader &header,
ct = schema::CollectionType::WEIGHTEDSET;
break;
default:
- LOG(error,
- "Bad collection type when writing field param in header");
- LOG_ABORT("should not be reached");
+ LOG_ABORT("Bad collection type when writing field param in header");
}
header.putTag(GenericHeader::Tag(collKey, schema::getTypeName(ct)));
header.putTag(GenericHeader::Tag(avgElemLenKey, _avgElemLen));
diff --git a/searchlib/src/vespa/searchlib/btree/btreeiterator.hpp b/searchlib/src/vespa/searchlib/btree/btreeiterator.hpp
index 18635dda546..02b73ef53f6 100644
--- a/searchlib/src/vespa/searchlib/btree/btreeiterator.hpp
+++ b/searchlib/src/vespa/searchlib/btree/btreeiterator.hpp
@@ -559,17 +559,14 @@ identical(const BTreeIteratorBase &rhs) const
{
if (_pathSize != rhs._pathSize || _leaf != rhs._leaf) {
HDR_ABORT("should not be reached");
- return false;
}
for (uint32_t level = 0; level < _pathSize; ++level) {
if (_path[level] != rhs._path[level]) {
HDR_ABORT("should not be reached");
- return false;
}
}
if (_leafRoot != rhs._leafRoot) {
HDR_ABORT("should not be reached");
- return false;
}
return true;
}
diff --git a/searchlib/src/vespa/searchlib/docstore/filechunk.cpp b/searchlib/src/vespa/searchlib/docstore/filechunk.cpp
index e9a1ffcda20..39394724853 100644
--- a/searchlib/src/vespa/searchlib/docstore/filechunk.cpp
+++ b/searchlib/src/vespa/searchlib/docstore/filechunk.cpp
@@ -245,7 +245,7 @@ FileChunk::updateLidMap(const LockGuard &guard, ISetLid &ds, uint64_t serialNum,
assert(idxFile.getSize() == 0);
}
} else {
- assert(false);
+ LOG_ABORT("should not reach here");
}
return sz;
}
diff --git a/storage/src/vespa/storage/distributor/maintenance/maintenancescheduler.cpp b/storage/src/vespa/storage/distributor/maintenance/maintenancescheduler.cpp
index d8b7ee81ba7..5481559cf5a 100644
--- a/storage/src/vespa/storage/distributor/maintenance/maintenancescheduler.cpp
+++ b/storage/src/vespa/storage/distributor/maintenance/maintenancescheduler.cpp
@@ -86,7 +86,6 @@ MaintenanceScheduler::convertToOperationPriority(MaintenancePriority::Priority p
case MaintenancePriority::VERY_HIGH:
return OperationStarter::Priority(0);
default:
- assert(false);
LOG_ABORT("should not be reached");
}
}
diff --git a/vespalib/src/vespa/vespalib/data/slime/binary_format.cpp b/vespalib/src/vespa/vespalib/data/slime/binary_format.cpp
index d6e12c7ab59..2febe3f4405 100644
--- a/vespalib/src/vespa/vespalib/data/slime/binary_format.cpp
+++ b/vespalib/src/vespa/vespalib/data/slime/binary_format.cpp
@@ -58,7 +58,7 @@ struct BinaryEncoder : public ArrayTraverser,
case ARRAY::ID: return encodeArray(inspector);
case OBJECT::ID: return encodeObject(inspector);
}
- LOG_ABORT("should not be reached"); // should not be reached
+ LOG_ABORT("should not be reached");
}
void encodeSymbolTable(const Slime &slime) {
size_t numSymbols = slime.symbols();
@@ -173,7 +173,7 @@ struct BinaryDecoder : SymbolHandler<remap_symbols>::type {
case ARRAY::ID: return decodeArray(inserter, meta);
case OBJECT::ID: return decodeObject(inserter, meta);
}
- LOG_ABORT("should not be reached"); // code should not be reached
+ LOG_ABORT("should not be reached");
}
void decodeValue(const Inserter &inserter) {
diff --git a/vespalib/src/vespa/vespalib/data/slime/inject.cpp b/vespalib/src/vespa/vespalib/data/slime/inject.cpp
index febd9058b00..7480550ceab 100644
--- a/vespalib/src/vespa/vespalib/data/slime/inject.cpp
+++ b/vespalib/src/vespa/vespalib/data/slime/inject.cpp
@@ -51,7 +51,7 @@ void injectValue(const Inserter &inserter, const Inspector &inspector, const Ins
case ARRAY::ID: return injectArray(inserter, inspector, guard);
case OBJECT::ID: return injectObject(inserter, inspector, guard);
}
- LOG_ABORT("should not be reached"); // should not be reached
+ LOG_ABORT("should not be reached");
}
void
diff --git a/vespalib/src/vespa/vespalib/data/slime/json_format.cpp b/vespalib/src/vespa/vespalib/data/slime/json_format.cpp
index 29ab55143e0..3e06529cd5b 100644
--- a/vespalib/src/vespa/vespalib/data/slime/json_format.cpp
+++ b/vespalib/src/vespa/vespalib/data/slime/json_format.cpp
@@ -136,7 +136,7 @@ struct JsonEncoder : public ArrayTraverser,
case ARRAY::ID: return encodeARRAY(inspector);
case OBJECT::ID: return encodeOBJECT(inspector);
}
- LOG_ABORT("should not be reached"); // should not be reached
+ LOG_ABORT("should not be reached");
}
void entry(size_t idx, const Inspector &inspector) override;
void field(const Memory &symbol_name, const Inspector &inspector) override;