aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2018-06-12 12:50:28 +0200
committerArne Juul <arnej@yahoo-inc.com>2018-06-12 13:51:45 +0200
commit016e584f0ad5a071e13d75eb8ad5ddb46b8c54f5 (patch)
tree869d4e4a4c4b8a9f9ef691b2980009017dece9e6 /searchcore
parent22796dddd3dc025018093783328ac87535ffecd9 (diff)
use LOG_ABORT not just abort()
* abort() has the unfortunate effect that nothing is seen in the log, just an event (which is usually not displayed); so ops people don't see that the program is crashing at all. * LOG_ABORT("message") will log an error with the message (and the file and line) before calling abort(), so it's easy to see what happened. * add or move <vespa/log/log.h> include and LOG_SETUP lines before LOG_ABORT is used (or included).
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.cpp8
-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/attribute/attribute_test.cpp6
-rw-r--r--searchcore/src/tests/proton/common/cachedselect_test.cpp6
-rw-r--r--searchcore/src/tests/proton/docsummary/docsummary.cpp2
-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.cpp10
-rw-r--r--searchcore/src/tests/proton/documentmetastore/lidreusedelayer/lidreusedelayer_test.cpp2
-rw-r--r--searchcore/src/tests/proton/matching/matching_test.cpp4
-rw-r--r--searchcore/src/tests/proton/matching/querynodes_test.cpp4
-rw-r--r--searchcore/src/tests/proton/reference/document_db_reference/document_db_reference_test.cpp5
-rw-r--r--searchcore/src/tests/proton/server/documentretriever_test.cpp3
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp6
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/attrupdate.cpp5
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/hw_info_sampler.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp5
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/tls_stats_map.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/attribute_utils.h2
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/mock_attribute_manager.h6
29 files changed, 72 insertions, 43 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..da1a7cdaa01 100644
--- a/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp
+++ b/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp
@@ -1,4 +1,8 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#include <vespa/log/log.h>
+LOG_SETUP("applyattrupdates_test");
+
#include <vespa/document/base/testdocrepo.h>
#include <vespa/document/fieldvalue/arrayfieldvalue.h>
#include <vespa/document/fieldvalue/bytefieldvalue.h>
@@ -20,10 +24,6 @@
#include <vespa/searchlib/attribute/reference_attribute.h>
#include <vespa/vespalib/testkit/testapp.h>
-#include <vespa/log/log.h>
-
-LOG_SETUP("applyattrupdates_test");
-
using namespace document;
using search::attribute::BasicType;
using search::attribute::Config;
diff --git a/searchcore/src/tests/grouping/grouping.cpp b/searchcore/src/tests/grouping/grouping.cpp
index b159be5288c..7c396d6d281 100644
--- a/searchcore/src/tests/grouping/grouping.cpp
+++ b/searchcore/src/tests/grouping/grouping.cpp
@@ -1,5 +1,8 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/log/log.h>
+LOG_SETUP("grouping_test");
+
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/searchlib/aggregation/grouping.h>
#include <vespa/searchlib/aggregation/sumaggregationresult.h>
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 3ef2461c682..b700bf45820 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,8 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+
+#include <vespa/log/log.h>
+LOG_SETUP("attibute_aspect_delayer_test");
+
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/stllike/string.h>
#include <vespa/searchcore/proton/test/attribute_utils.h>
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..e95543dab69 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
@@ -1,5 +1,8 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/log/log.h>
+LOG_SETUP("attribute_initializer_test");
+
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchcore/proton/attribute/attribute_directory.h>
#include <vespa/searchcore/proton/attribute/attribute_factory.h>
diff --git a/searchcore/src/tests/proton/attribute/attribute_test.cpp b/searchcore/src/tests/proton/attribute/attribute_test.cpp
index c41b6bdcb97..5954932bbaf 100644
--- a/searchcore/src/tests/proton/attribute/attribute_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_test.cpp
@@ -1,5 +1,8 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/log/log.h>
+LOG_SETUP("attribute_test");
+
#include <vespa/config-attributes.h>
#include <vespa/document/fieldvalue/document.h>
#include <vespa/document/predicate/predicate_slime_builder.h>
@@ -44,9 +47,6 @@
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/searchcommon/attribute/iattributevector.h>
-#include <vespa/log/log.h>
-LOG_SETUP("attribute_test");
-
namespace vespa { namespace config { namespace search {}}}
using namespace config;
diff --git a/searchcore/src/tests/proton/common/cachedselect_test.cpp b/searchcore/src/tests/proton/common/cachedselect_test.cpp
index dcba8fda1c6..5de2728fa59 100644
--- a/searchcore/src/tests/proton/common/cachedselect_test.cpp
+++ b/searchcore/src/tests/proton/common/cachedselect_test.cpp
@@ -1,5 +1,8 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/log/log.h>
+LOG_SETUP("cachedselect_test");
+
#include <vespa/document/base/documentid.h>
#include <vespa/document/datatype/documenttype.h>
#include <vespa/document/fieldvalue/document.h>
@@ -23,9 +26,6 @@
#include <vespa/searchlib/test/mock_attribute_manager.h>
#include <vespa/vespalib/testkit/testapp.h>
-#include <vespa/log/log.h>
-LOG_SETUP("cachedselect_test");
-
using document::DataType;
using document::Document;
using document::DocumentId;
diff --git a/searchcore/src/tests/proton/docsummary/docsummary.cpp b/searchcore/src/tests/proton/docsummary/docsummary.cpp
index 7eae1c9d12d..79d38e2dc56 100644
--- a/searchcore/src/tests/proton/docsummary/docsummary.cpp
+++ b/searchcore/src/tests/proton/docsummary/docsummary.cpp
@@ -213,7 +213,7 @@ 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..4e66b9a8589 100644
--- a/searchcore/src/tests/proton/document_iterator/document_iterator_test.cpp
+++ b/searchcore/src/tests/proton/document_iterator/document_iterator_test.cpp
@@ -1,5 +1,8 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/log/log.h>
+LOG_SETUP("document_iterator_test");
+
#include <vespa/document/fieldset/fieldsets.h>
#include <vespa/document/fieldvalue/fieldvalues.h>
#include <vespa/document/datatype/documenttype.h>
diff --git a/searchcore/src/tests/proton/documentdb/clusterstatehandler/clusterstatehandler_test.cpp b/searchcore/src/tests/proton/documentdb/clusterstatehandler/clusterstatehandler_test.cpp
index b5cf1733ba9..0af15f0bd05 100644
--- a/searchcore/src/tests/proton/documentdb/clusterstatehandler/clusterstatehandler_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/clusterstatehandler/clusterstatehandler_test.cpp
@@ -1,4 +1,7 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/log/log.h>
+LOG_SETUP("cluster_state_handler_test");
+
#include <vespa/searchcore/proton/server/clusterstatehandler.h>
#include <vespa/searchcore/proton/server/iclusterstatechangedhandler.h>
#include <vespa/searchcore/proton/test/test.h>
diff --git a/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp b/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
index 11e9aa8c3ec..7daab40c40f 100644
--- a/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
@@ -1,5 +1,8 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/log/log.h>
+LOG_SETUP("document_bucket_mover_test");
+
#include <vespa/searchcore/proton/bucketdb/bucketdbhandler.h>
#include <vespa/searchcore/proton/bucketdb/bucket_create_notifier.h>
#include <vespa/searchcore/proton/test/bucketfactory.h>
diff --git a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
index c7790f9c507..3ddcebbc428 100644
--- a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
@@ -1,5 +1,8 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/log/log.h>
+LOG_SETUP("maintenancecontroller_test");
+
#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/test/make_bucket_space.h>
#include <vespa/searchcore/proton/attribute/attribute_usage_filter.h>
@@ -38,9 +41,6 @@
#include <vespa/vespalib/util/threadstackexecutor.h>
#include <unistd.h>
-#include <vespa/log/log.h>
-LOG_SETUP("maintenancecontroller_test");
-
using namespace proton;
using namespace vespalib::slime;
using document::BucketId;
@@ -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..0280f377549 100644
--- a/searchcore/src/tests/proton/matching/matching_test.cpp
+++ b/searchcore/src/tests/proton/matching/matching_test.cpp
@@ -1,6 +1,8 @@
// 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/log/log.h>
+LOG_SETUP("matching_test");
#include <vespa/document/base/globalid.h>
#include <initializer_list>
@@ -33,8 +35,6 @@
#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");
using namespace proton::matching;
using namespace proton;
diff --git a/searchcore/src/tests/proton/matching/querynodes_test.cpp b/searchcore/src/tests/proton/matching/querynodes_test.cpp
index 6607019cccc..3b8b85924c2 100644
--- a/searchcore/src/tests/proton/matching/querynodes_test.cpp
+++ b/searchcore/src/tests/proton/matching/querynodes_test.cpp
@@ -31,11 +31,11 @@
#include <vespa/searchlib/queryeval/fake_requestcontext.h>
#include <vespa/vespalib/testkit/testapp.h>
-#include <vespa/searchlib/attribute/singlenumericattribute.hpp>
-
#include <vespa/log/log.h>
LOG_SETUP("querynodes_test");
+#include <vespa/searchlib/attribute/singlenumericattribute.hpp>
+
using search::fef::FieldInfo;
using search::fef::FieldType;
using search::fef::MatchData;
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..18ee8667ecc 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,5 +1,7 @@
// 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/log/log.h>
+LOG_SETUP("document_db_reference_test");
#include <vespa/searchcore/proton/attribute/imported_attributes_repo.h>
#include <vespa/searchcore/proton/reference/document_db_reference.h>
@@ -7,9 +9,6 @@
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/imported_attribute_vector.h>
-#include <vespa/log/log.h>
-LOG_SETUP("document_db_reference_test");
-
using namespace proton;
using search::AttributeFactory;
diff --git a/searchcore/src/tests/proton/server/documentretriever_test.cpp b/searchcore/src/tests/proton/server/documentretriever_test.cpp
index 69e90a6fdf8..6f74596b538 100644
--- a/searchcore/src/tests/proton/server/documentretriever_test.cpp
+++ b/searchcore/src/tests/proton/server/documentretriever_test.cpp
@@ -1,6 +1,9 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
// Unit tests for documentretriever.
+#include <vespa/log/log.h>
+LOG_SETUP("document_retriever_test");
+
#include <vespa/document/base/documentid.h>
#include <vespa/document/bucket/bucketid.h>
#include <vespa/document/datatype/datatype.h>
diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp
index f775f4443f8..a00ec759647 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_directory.cpp
@@ -95,7 +95,7 @@ AttributeDirectory::saveSnapInfo()
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 239f91b449f..0a0ecbda21c 100644
--- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
+++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp
@@ -1,5 +1,8 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.attribute.attribute_writer");
+
#include "attribute_writer.h"
#include "ifieldupdatecallback.h"
#include "attributemanager.h"
@@ -15,9 +18,6 @@
#include <vespa/searchlib/common/idestructorcallback.h>
-#include <vespa/log/log.h>
-LOG_SETUP(".proton.server.attributeadapter");
-
using namespace document;
using namespace search;
using search::attribute::ImportedAttributeVector;
diff --git a/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp b/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp
index 6fa19f0f35e..8faa6e03401 100644
--- a/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/attributefieldvaluenode.cpp
@@ -4,6 +4,8 @@
#include "selectcontext.h"
#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..f3ef4856631 100644
--- a/searchcore/src/vespa/searchcore/proton/common/attrupdate.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/attrupdate.cpp
@@ -1,5 +1,7 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.common.attrupdate");
#include "attrupdate.h"
#include <vespa/document/fieldvalue/arrayfieldvalue.h>
#include <vespa/document/fieldvalue/predicatefieldvalue.h>
@@ -22,9 +24,6 @@
#include <vespa/searchlib/attribute/changevector.hpp>
#include <sstream>
-#include <vespa/log/log.h>
-LOG_SETUP(".attrupdate");
-
using namespace document;
using vespalib::make_string;
using search::tensor::TensorAttribute;
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..b81cfae0ee7 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
@@ -1,5 +1,8 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/log/log.h>
+LOG_SETUP(".proton.documentmetastore");
+
#include "documentmetastore.h"
#include "search_context.h"
#include "documentmetastoresaver.h"
@@ -77,7 +80,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..fa43ce370ae 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_tools.cpp
@@ -5,7 +5,7 @@
#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 987218beefa..87735dfef5d 100644
--- a/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp
@@ -27,7 +27,7 @@ getRepo(const std::vector<IFeedView::SP> &views)
continue;
return view->getDocumentTypeRepo();
}
- abort();
+ 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 ec22d3293c4..f91892114ea 100644
--- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfigmanager.cpp
@@ -292,7 +292,7 @@ DocumentDBConfigManager::update(const ConfigSnapshot &snapshot)
search::index::SchemaBuilder::build(*newIndexschemaConfig, schema);
if (!search::index::SchemaUtil::validateSchema(schema)) {
LOG(error, "Cannot use bad index schema, validation failed");
- abort();
+ LOG_ABORT("should not be reached");
}
}
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..6270b8b3a89 100644
--- a/searchcore/src/vespa/searchcore/proton/test/attribute_utils.h
+++ b/searchcore/src/vespa/searchcore/proton/test/attribute_utils.h
@@ -24,7 +24,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)) { LOG_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..9385c160927 100644
--- a/searchcore/src/vespa/searchcore/proton/test/mock_attribute_manager.h
+++ b/searchcore/src/vespa/searchcore/proton/test/mock_attribute_manager.h
@@ -54,16 +54,16 @@ public:
virtual void pruneRemovedFields(search::SerialNum) override {
}
virtual const IAttributeFactory::SP &getFactory() const override {
- abort();
+ LOG_ABORT("should not be reached");
}
virtual search::ISequencedTaskExecutor &getAttributeFieldWriter() const override {
- abort();
+ LOG_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();
+ LOG_ABORT("should not be reached");
}
virtual void asyncForEachAttribute(std::shared_ptr<IAttributeFunctor>) const override {
}