summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2018-06-21 13:09:24 +0200
committerGitHub <noreply@github.com>2018-06-21 13:09:24 +0200
commit5c288675473173ac397a0fb1a21846f41681800d (patch)
tree4a74df62884da11e55940ffc6f83a9e84a9f1f14 /searchcore
parent50ec63c3a06da7bef8cc8706decb1872a10f4389 (diff)
parentaa41e19ecc9692b3b839725383e3e7706d3042fb (diff)
Merge pull request #6180 from vespa-engine/arnej/use-log-abort
use LOG_ABORT not just abort()
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/apps/vespa-gen-testdocs/vespa-gen-testdocs.cpp2
-rw-r--r--searchcore/src/tests/applyattrupdates/applyattrupdates.cpp2
-rw-r--r--searchcore/src/tests/grouping/grouping.cpp3
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_aspect_delayer/attribute_aspect_delayer_test.cpp4
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp3
-rw-r--r--searchcore/src/tests/proton/docsummary/docsummary.cpp4
-rw-r--r--searchcore/src/tests/proton/document_iterator/document_iterator_test.cpp3
-rw-r--r--searchcore/src/tests/proton/documentdb/clusterstatehandler/clusterstatehandler_test.cpp3
-rw-r--r--searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp3
-rw-r--r--searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp4
-rw-r--r--searchcore/src/tests/proton/documentmetastore/lidreusedelayer/lidreusedelayer_test.cpp2
-rw-r--r--searchcore/src/tests/proton/matching/matching_test.cpp2
-rw-r--r--searchcore/src/tests/proton/matching/querynodes_test.cpp1
-rw-r--r--searchcore/src/tests/proton/reference/document_db_reference/document_db_reference_test.cpp1
-rw-r--r--searchcore/src/tests/proton/server/documentretriever_test.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp5
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/attrupdate.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/hw_info_sampler.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/tls_stats_map.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/attribute_utils.h3
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/mock_attribute_manager.h7
28 files changed, 57 insertions, 30 deletions
diff --git a/searchcore/src/apps/vespa-gen-testdocs/vespa-gen-testdocs.cpp b/searchcore/src/apps/vespa-gen-testdocs/vespa-gen-testdocs.cpp
index f40502e14d1..e6b7b34903b 100644
--- a/searchcore/src/apps/vespa-gen-testdocs/vespa-gen-testdocs.cpp
+++ b/searchcore/src/apps/vespa-gen-testdocs/vespa-gen-testdocs.cpp
@@ -71,7 +71,7 @@ shafile(const string &baseDir,
bool openres = f.OpenReadOnly(fullFile.c_str());
if (!openres) {
LOG(error, "Could not open %s for sha256 checksum", fullFile.c_str());
- abort();
+ LOG_ABORT("should not be reached");
}
int64_t flen = f.GetSize();
int64_t remainder = flen;
diff --git a/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp b/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp
index 4c4027da6d6..48c02215732 100644
--- a/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp
+++ b/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp
@@ -1,4 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
#include <vespa/document/base/testdocrepo.h>
#include <vespa/document/fieldvalue/arrayfieldvalue.h>
#include <vespa/document/fieldvalue/bytefieldvalue.h>
@@ -21,7 +22,6 @@
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/log/log.h>
-
LOG_SETUP("applyattrupdates_test");
using namespace document;
diff --git a/searchcore/src/tests/grouping/grouping.cpp b/searchcore/src/tests/grouping/grouping.cpp
index b159be5288c..7e21fffe9fd 100644
--- a/searchcore/src/tests/grouping/grouping.cpp
+++ b/searchcore/src/tests/grouping/grouping.cpp
@@ -12,6 +12,9 @@
#include <vespa/searchcore/proton/matching/sessionmanager.h>
#include <iostream>
+#include <vespa/log/log.h>
+LOG_SETUP("grouping_test");
+
using namespace search::attribute;
using namespace search::aggregation;
using namespace search::expression;
diff --git a/searchcore/src/tests/proton/attribute/attribute_aspect_delayer/attribute_aspect_delayer_test.cpp b/searchcore/src/tests/proton/attribute/attribute_aspect_delayer/attribute_aspect_delayer_test.cpp
index aeafcc26794..24c38ad118b 100644
--- a/searchcore/src/tests/proton/attribute/attribute_aspect_delayer/attribute_aspect_delayer_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_aspect_delayer/attribute_aspect_delayer_test.cpp
@@ -1,4 +1,5 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/stllike/string.h>
#include <vespa/searchcore/proton/test/attribute_utils.h>
@@ -10,6 +11,9 @@
#include <vespa/config-attributes.h>
#include <vespa/config-summarymap.h>
+#include <vespa/log/log.h>
+LOG_SETUP("attibute_aspect_delayer_test");
+
using vespa::config::search::AttributesConfig;
using vespa::config::search::AttributesConfigBuilder;
using vespa::config::search::IndexschemaConfig;
diff --git a/searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp b/searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp
index 7958d05d825..4957d3aead2 100644
--- a/searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_initializer/attribute_initializer_test.cpp
@@ -10,6 +10,9 @@
#include <vespa/searchlib/test/directory_handler.h>
#include <vespa/vespalib/stllike/string.h>
+#include <vespa/log/log.h>
+LOG_SETUP("attribute_initializer_test");
+
using search::attribute::Config;
using search::attribute::BasicType;
using search::attribute::CollectionType;
diff --git a/searchcore/src/tests/proton/docsummary/docsummary.cpp b/searchcore/src/tests/proton/docsummary/docsummary.cpp
index b2bf768052b..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())) { abort(); }
+ 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/tests/proton/document_iterator/document_iterator_test.cpp b/searchcore/src/tests/proton/document_iterator/document_iterator_test.cpp
index a7512b41f30..3add3b727b9 100644
--- a/searchcore/src/tests/proton/document_iterator/document_iterator_test.cpp
+++ b/searchcore/src/tests/proton/document_iterator/document_iterator_test.cpp
@@ -17,6 +17,9 @@
#include <vespa/vespalib/objects/nbostream.h>
#include <vespa/vespalib/testkit/test_kit.h>
+#include <vespa/log/log.h>
+LOG_SETUP("document_iterator_test");
+
using document::BucketId;
using document::DataType;
using document::Document;
diff --git a/searchcore/src/tests/proton/documentdb/clusterstatehandler/clusterstatehandler_test.cpp b/searchcore/src/tests/proton/documentdb/clusterstatehandler/clusterstatehandler_test.cpp
index b5cf1733ba9..dc4e88ae005 100644
--- a/searchcore/src/tests/proton/documentdb/clusterstatehandler/clusterstatehandler_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/clusterstatehandler/clusterstatehandler_test.cpp
@@ -6,6 +6,9 @@
#include <vespa/vdslib/distribution/distribution.h>
#include <vespa/vdslib/state/clusterstate.h>
+#include <vespa/log/log.h>
+LOG_SETUP("cluster_state_handler_test");
+
using namespace proton;
using document::BucketId;
using storage::lib::Distribution;
diff --git a/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp b/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
index 11e9aa8c3ec..af6a9d38385 100644
--- a/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
@@ -18,6 +18,9 @@
#include <vespa/document/test/make_bucket_space.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/log/log.h>
+LOG_SETUP("document_bucket_mover_test");
+
using namespace proton;
using document::BucketId;
using document::Document;
diff --git a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
index c7790f9c507..4a3ced6891c 100644
--- a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
@@ -153,14 +153,14 @@ struct MyDocumentRetriever : public DocumentRetrieverBaseForTest
virtual const document::DocumentTypeRepo &
getDocumentTypeRepo() const override
{
- abort();
+ LOG_ABORT("should not be reached");
}
virtual void
getBucketMetaData(const storage::spi::Bucket &,
DocumentMetaData::Vector &) const override
{
- abort();
+ LOG_ABORT("should not be reached");
}
virtual DocumentMetaData
getDocumentMetaData(const DocumentId &) const override
diff --git a/searchcore/src/tests/proton/documentmetastore/lidreusedelayer/lidreusedelayer_test.cpp b/searchcore/src/tests/proton/documentmetastore/lidreusedelayer/lidreusedelayer_test.cpp
index d56340be2b2..df411ea0346 100644
--- a/searchcore/src/tests/proton/documentmetastore/lidreusedelayer/lidreusedelayer_test.cpp
+++ b/searchcore/src/tests/proton/documentmetastore/lidreusedelayer/lidreusedelayer_test.cpp
@@ -113,7 +113,7 @@ public:
virtual const RawDocumentMetaData &getRawMetaData(DocId) const override
{
- abort();
+ LOG_ABORT("should not be reached");
}
virtual bool getFreeListActive() const override
diff --git a/searchcore/src/tests/proton/matching/matching_test.cpp b/searchcore/src/tests/proton/matching/matching_test.cpp
index 76e3b3e4af9..0d474fc57cf 100644
--- a/searchcore/src/tests/proton/matching/matching_test.cpp
+++ b/searchcore/src/tests/proton/matching/matching_test.cpp
@@ -1,7 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/testapp.h>
-
#include <vespa/document/base/globalid.h>
#include <initializer_list>
#include <vespa/searchcommon/attribute/iattributecontext.h>
@@ -33,6 +32,7 @@
#include <vespa/searchcore/proton/matching/match_params.h>
#include <vespa/searchcore/proton/matching/match_tools.h>
#include <vespa/searchcore/proton/matching/match_context.h>
+
#include <vespa/log/log.h>
LOG_SETUP("matching_test");
diff --git a/searchcore/src/tests/proton/matching/querynodes_test.cpp b/searchcore/src/tests/proton/matching/querynodes_test.cpp
index 6607019cccc..297f75054b2 100644
--- a/searchcore/src/tests/proton/matching/querynodes_test.cpp
+++ b/searchcore/src/tests/proton/matching/querynodes_test.cpp
@@ -30,7 +30,6 @@
#include <vespa/searchlib/queryeval/fake_search.h>
#include <vespa/searchlib/queryeval/fake_requestcontext.h>
#include <vespa/vespalib/testkit/testapp.h>
-
#include <vespa/searchlib/attribute/singlenumericattribute.hpp>
#include <vespa/log/log.h>
diff --git a/searchcore/src/tests/proton/reference/document_db_reference/document_db_reference_test.cpp b/searchcore/src/tests/proton/reference/document_db_reference/document_db_reference_test.cpp
index fc9d2d770cd..9b268350b0d 100644
--- a/searchcore/src/tests/proton/reference/document_db_reference/document_db_reference_test.cpp
+++ b/searchcore/src/tests/proton/reference/document_db_reference/document_db_reference_test.cpp
@@ -1,6 +1,5 @@
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/vespalib/testkit/testapp.h>
-
#include <vespa/searchcore/proton/attribute/imported_attributes_repo.h>
#include <vespa/searchcore/proton/reference/document_db_reference.h>
#include <vespa/searchcore/proton/test/mock_attribute_manager.h>
diff --git a/searchcore/src/tests/proton/server/documentretriever_test.cpp b/searchcore/src/tests/proton/server/documentretriever_test.cpp
index 69e90a6fdf8..f8ec0d20d33 100644
--- a/searchcore/src/tests/proton/server/documentretriever_test.cpp
+++ b/searchcore/src/tests/proton/server/documentretriever_test.cpp
@@ -33,6 +33,9 @@
#include <vespa/searchlib/attribute/stringbase.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/log/log.h>
+LOG_SETUP("document_retriever_test");
+
using document::ArrayFieldValue;
using document::FieldValue;
using document::BucketId;
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 f775f4443f8..f2e4ac4905d 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp
@@ -92,10 +92,9 @@ 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());
- abort();
+ LOG_ABORT("should not be reached");
}
}
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
index 944882b1e98..eb6020b8d5f 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
@@ -16,7 +16,7 @@
#include <vespa/vespalib/stllike/hash_map.hpp>
#include <vespa/log/log.h>
-LOG_SETUP(".proton.server.attributeadapter");
+LOG_SETUP(".proton.attribute.attribute_writer");
using namespace document;
using namespace search;
diff --git a/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp b/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp
index 6fa19f0f35e..b76451b377d 100644
--- a/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp
@@ -5,6 +5,8 @@
#include <vespa/searchcommon/attribute/attributecontent.h>
#include <vespa/searchlib/attribute/attributevector.h>
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.common.attribute_field_value_node");
namespace proton {
@@ -80,7 +82,7 @@ getValue(const Context &context) const
} while (0);
break;
default:
- abort();
+ LOG_ABORT("should not be reached");
}
return Value::UP();
diff --git a/searchcore/src/vespa/searchcore/proton/common/attrupdate.cpp b/searchcore/src/vespa/searchcore/proton/common/attrupdate.cpp
index 7c0a1815019..dac0fbc2cc7 100644
--- a/searchcore/src/vespa/searchcore/proton/common/attrupdate.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/attrupdate.cpp
@@ -17,13 +17,12 @@
#include <vespa/searchlib/common/base.h>
#include <vespa/searchlib/tensor/tensor_attribute.h>
#include <vespa/searchlib/attribute/reference_attribute.h>
-
#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/searchlib/attribute/changevector.hpp>
#include <sstream>
#include <vespa/log/log.h>
-LOG_SETUP(".attrupdate");
+LOG_SETUP(".proton.common.attrupdate");
using namespace document;
using vespalib::make_string;
diff --git a/searchcore/src/vespa/searchcore/proton/common/hw_info_sampler.cpp b/searchcore/src/vespa/searchcore/proton/common/hw_info_sampler.cpp
index c9bf81d1310..190e904ad68 100644
--- a/searchcore/src/vespa/searchcore/proton/common/hw_info_sampler.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/hw_info_sampler.cpp
@@ -10,6 +10,8 @@
#include <vespa/vespalib/io/fileutil.h>
#include <experimental/filesystem>
#include <thread>
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.common.hw_info_sampler");
using config::ConfigHandle;
using config::ConfigSubscriber;
@@ -70,7 +72,7 @@ void writeConfig(const vespalib::string &path,
builder.disk.sampletime = std::chrono::duration_cast<std::chrono::seconds>(sampleTime.time_since_epoch()).count();
config::FileConfigWriter writer(path + "/hwinfo.cfg");
if (!writer.write(builder)) {
- abort();
+ LOG_ABORT("should not be reached");
}
}
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
index d2bbde1eadd..838efdfe5a4 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
@@ -21,6 +21,8 @@
#include <vespa/fastos/file.h>
#include "document_meta_store_versions.h"
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.documentmetastore");
using document::BucketId;
using document::GlobalId;
@@ -77,7 +79,7 @@ public:
_headerLen = _header.readFile(*_datFile);
_datFile->SetPosition(_headerLen);
if (!search::ReaderBase::extractFileSize(_header, *_datFile, _datFileSize)) {
- abort();
+ LOG_ABORT("should not be reached");
}
_docIdLimit = _header.getTag(DOCID_LIMIT).asInteger();
_version = _header.getTag(VERSION).asInteger();
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/tls_stats_map.cpp b/searchcore/src/vespa/searchcore/proton/flushengine/tls_stats_map.cpp
index 088e202c027..c9ba495aa82 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/tls_stats_map.cpp
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/tls_stats_map.cpp
@@ -2,6 +2,8 @@
#include "tls_stats_map.h"
#include <vespa/vespalib/stllike/hash_map.hpp>
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.flushengine.tls_stats_map");
namespace proton {
namespace flushengine {
@@ -18,7 +20,7 @@ TlsStatsMap::getTlsStats(const vespalib::string &domain) const {
if (itr != _map.end()) {
return itr->second;
}
- abort();
+ LOG_ABORT("should not be reached");
}
}
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
index 805c4a94c3b..d52d0fcd841 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
@@ -3,9 +3,8 @@
#include "match_tools.h"
#include "querynodes.h"
#include <vespa/searchlib/parsequery/stackdumpiterator.h>
-
#include <vespa/log/log.h>
-LOG_SETUP(".searchcore.matching.match_tools");
+LOG_SETUP(".proton.matching.match_tools");
#include <vespa/searchlib/query/tree/querytreecreator.h>
using search::attribute::IAttributeContext;
diff --git a/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp b/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp
index 6ed801154d8..20306e92ea8 100644
--- a/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp
@@ -25,8 +25,7 @@ getRepo(const std::vector<IFeedView::SP> &views)
continue;
return view->getDocumentTypeRepo();
}
- abort();
- return std::shared_ptr<const DocumentTypeRepo>();
+ LOG_ABORT("should not be reached");
}
};
diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
index ec22d3293c4..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");
- abort();
+ LOG_ABORT("Cannot use bad index schema, validation failed");
}
}
if (snapshot.isChanged<AttributesConfig>(_configId, currentGeneration)) {
diff --git a/searchcore/src/vespa/searchcore/proton/test/attribute_utils.h b/searchcore/src/vespa/searchcore/proton/test/attribute_utils.h
index 6229e989cba..f1d661a3ad0 100644
--- a/searchcore/src/vespa/searchcore/proton/test/attribute_utils.h
+++ b/searchcore/src/vespa/searchcore/proton/test/attribute_utils.h
@@ -1,6 +1,7 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
+#include <vespa/vespalib/util/hdr_abort.h>
#include <vespa/searchcommon/attribute/config.h>
#include <vespa/searchlib/attribute/integerbase.h>
@@ -24,7 +25,7 @@ struct AttributeUtils
search::IntegerAttribute &ia = static_cast<search::IntegerAttribute &>(*attr);
while (ia.getNumDocs() < to) {
uint32_t docId;
- if (!ia.addDoc(docId)) { abort(); }
+ if (!ia.addDoc(docId)) { HDR_ABORT("should not be reached"); }
}
for (uint32_t i = from; i < to; ++i) {
ia.update(i, value);
diff --git a/searchcore/src/vespa/searchcore/proton/test/mock_attribute_manager.h b/searchcore/src/vespa/searchcore/proton/test/mock_attribute_manager.h
index 9dad0d32b61..b0b999e0d30 100644
--- a/searchcore/src/vespa/searchcore/proton/test/mock_attribute_manager.h
+++ b/searchcore/src/vespa/searchcore/proton/test/mock_attribute_manager.h
@@ -1,6 +1,7 @@
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
+#include <vespa/vespalib/util/hdr_abort.h>
#include <vespa/searchlib/test/mock_attribute_manager.h>
#include <vespa/searchcore/proton/attribute/i_attribute_manager.h>
#include <vespa/searchcore/proton/attribute/imported_attributes_repo.h>
@@ -54,16 +55,16 @@ public:
virtual void pruneRemovedFields(search::SerialNum) override {
}
virtual const IAttributeFactory::SP &getFactory() const override {
- abort();
+ HDR_ABORT("should not be reached");
}
virtual search::ISequencedTaskExecutor &getAttributeFieldWriter() const override {
- abort();
+ HDR_ABORT("should not be reached");
}
virtual search::AttributeVector *getWritableAttribute(const vespalib::string &) const override {
return nullptr;
}
virtual const std::vector<search::AttributeVector *> &getWritableAttributes() const override {
- abort();
+ HDR_ABORT("should not be reached");
}
virtual void asyncForEachAttribute(std::shared_ptr<IAttributeFunctor>) const override {
}