8000 Use frozen::unordered_map for ErrorMessages by goedderz · Pull Request #13496 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content
8000

Use frozen::unordered_map for ErrorMessages #13496

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 90 commits into from
Feb 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
3e30055
Made Result contain only an optional pointer to an error
goedderz Jan 21, 2021
fd78e02
Fixed compile error
goedderz Jan 21, 2021
df2e43c
Avoid no-error allocations
goedderz Jan 21, 2021
d447876
WIP
goedderz Jan 25, 2021
4d8d9b1
WIP
goedderz Jan 25, 2021
ab77f45
Added concatT and joinT to StringUtils
goedderz Jan 25, 2021
331fad5
Fixed tests
goedderz Jan 25, 2021
bfc7901
Merge branch 'feature/string-utils-concat-join' of github.com:arangod…
goedderz Jan 25, 2021
699a5dc
Changed namespace from impl to detail
goedderz Jan 25, 2021
8aa96ae
Assert capacity
goedderz Jan 25, 2021
b0e1b0c
Fixed compile errors
goedderz Jan 25, 2021
83bb4f8
Return a string_view in Result::errorMessage
goedderz Jan 25, 2021
c2435bc
Removed erroneous line
goedderz Jan 25, 2021
6949f89
Merge branch 'feature/refactor-error-message-string-view' of github.c…
goedderz Jan 25, 2021
0fed08d
Fixed some compile errors
goedderz Jan 26, 2021
d91cfb5
Some minor changes
goedderz Jan 26, 2021
6eb6ee1
Merge branch 'feature/refactor-error-message-string-view' of github.c…
goedderz Jan 26, 2021
1956b21
Update lib/Basics/ResultT.h
goedderz Jan 26, 2021
f5de874
Merge branch 'feature/refactor-error-message-string-view' of github.c…
goedderz Jan 26, 2021
84511fb
Fixed Mac compile error
goedderz Jan 26, 2021
eaacdc0
Merge branch 'feature/string-utils-concat-join' of github.com:arangod…
goedderz Jan 26, 2021
d988cf8
Merge branch 'feature/refactor-error-message-string-view' of github.c…
goedderz Jan 26, 2021
6d83aeb
Update lib/Basics/Result.h
goedderz Jan 27, 2021
937877d
Added errorMessage move overloads
goedderz Jan 27, 2021
4d49f20
Added noexcept where mentioned in reviews
goedderz Jan 27, 2021
0e098b2
Be consistent.
goedderz Jan 27, 2021
9c209b3
Merge branch 'devel' of github.com:arangodb/arangodb into feature/sma…
goedderz Jan 27, 2021
9e25112
Removed superfluous lines
goedderz Jan 27, 2021
bc3c0ef
Merge branch 'devel' of github.com:arangodb/arangodb into feature/sma…
goedderz Jan 27, 2021
27fb946
Fixed merge conflict
goedderz Jan 27, 2021
0433a27
Minor changes
goedderz Jan 27, 2021
0fa6aa1
Added some assertions
goedderz Jan 28, 2021
76f2312
Pass conflictingDocumentKey separately, no longer in a Result's error…
goedderz Jan 28, 2021
690c2d7
Fixed prior commit
goedderz Jan 28, 2021
01ed70a
Added ErrorCode and changed errorfile generation accordingly
goedderz Jan 28, 2021
e57dd14
Regenerate errorfiles if the script changed as well
goedderz Jan 28, 2021
932818c
Make libarango compile with ErrorCode
goedderz Jan 28, 2021
5566c81
Make arango_v8 compile
goedderz Jan 29, 2021
fa8baa3
Make arango_network compile
goedderz Jan 29, 2021
7c49d47
Make arango_shell compile
goedderz Jan 29, 2021
d381218
Make arango_indexes and arango_cluster_engine compile
goedderz Jan 29, 2021
ff8c330
Made arangosh compile
goedderz Jan 29, 2021
4c95166
Made arango_cluster_methods compile
goedderz Jan 29, 2021
a52fe06
Made arangobench compile
goedderz Jan 29, 2021
b555dc1
Made arangoimport, -backup, -restore, and -dump compile
goedderz Jan 29, 2021
b927c56
Made arango_iresearch compile
goedderz Jan 29, 2021
dfe105a
Made arango_storage_engine_common compile
goedderz Jan 29, 2021
f816181
Fix compile error
goedderz Jan 29, 2021
2fa9254
Made arango_agency compile
goedderz Jan 29, 2021
0fc65b7
Made arango_pregel compile
goedderz Jan 29, 2021
a6e7b67
Fixed assertion
goedderz Jan 29, 2021
61e06c6
Made arango_common_rest_handler compile
goedderz Jan 29, 2021
411fec1
Made arango_rocksdb compile
goedderz Jan 29, 2021
d2e717f
Made arango_storage_engine compile
goedderz Jan 29, 2021
1a8d2d6
Made arango_replication compile
goedderz Jan 29, 2021
c812ab7
Merge branch 'feature/small-result-with-external-error' of github.com…
goedderz Jan 29, 2021
943bf3e
Fix
goedderz Feb 1, 2021
e928f04
Only return conflicting key when it's meaningful, to soothe an assertion
goedderz Feb 1, 2021
23b957d
Made arango_vocbase compile
goedderz Feb 1, 2021
0d78b83
Reformat
goedderz Feb 1, 2021
ef30942
Added a comment
goedderz Feb 1, 2021
a29e7bd
Addressed review comments
goedderz Feb 1, 2021
ea52266
Made arango_graph compile
goedderz Feb 1, 2021
a4980a4
Made arango_aql compile
goedderz Feb 1, 2021
672b488
Made arango_v8server compile
goedderz Feb 3, 2021
359575c
Made arangosh compile
goedderz Feb 3, 2021
aeb1ce9
Made arangoserver compile
goedderz Feb 3, 2021
799d190
Merge commit '0737c305c536043a3cde5916957dd2714836d25f' into tmp
goedderz Feb 3, 2021
2580766
Merge branch 'tmp' into feature/strict-typing-for-error-codes
goedderz Feb 3, 2021
64ffbc6
Merge branch 'devel' of github.com:arangodb/arangodb into feature/str…
goedderz Feb 3, 2021
a90d8fb
Made arangodbtests compile
goedderz Feb 3, 2021
92cec6f
Fixed compile errors in CE and tests
goedderz Feb 3, 2021
bd5265e
reformat
goedderz Feb 4, 2021
33b212e
Update arangod/GeneralServer/RestHandler.cpp
goedderz Feb 5, 2021
9523d4b
Update lib/Basics/tri-zip.cpp
goedderz Feb 5, 2021
eb92d47
Update lib/V8/v8-utils.cpp
goedderz Feb 5, 2021
e428231
Addressed review comments
goedderz Feb 5, 2021
ba6f370
Merge branch 'feature/strict-typing-for-error-codes' of github.com:ar…
goedderz Feb 5, 2021
551dd4e
Use frozen::unordered_map for ErrorMessages
goedderz Feb 5, 2021
15d03dc
Update lib/Basics/files.cpp
goedderz Feb 5, 2021
8fc6866
Merge branch 'devel' of github.com:arangodb/arangodb into feature/str…
goedderz Feb 5, 2021
7cefbf0
Merge branch 'feature/strict-typing-for-error-codes' of github.com:ar…
goedderz Feb 5, 2021
1815cf1
Fixed merge conflict: regenerated errorfiles
goedderz Feb 8, 2021
3ca1a7b
Merge branch 'devel' of github.com:arangodb/arangodb into feature/str…
goedderz Feb 8, 2021
11f9cc4
Fix alignment to the previous column
goedderz Feb 8, 2021
2c09f65
Regenerated errorfiles
goedderz Feb 8, 2021
4d12b63
Merge commit '0e41342ee8c823cb8952462134a6928e22c760ba' into tmp
goedderz Feb 10, 2021
c390c1f
Merge branch 'tmp' into feature/use-frozen-map-for-error-messages
goedderz Feb 10, 2021
220c07f
Merge remote-tracking branch 'origin/devel' into feature/use-frozen-m…
goedderz Feb 10, 2021
d459aaa
Merge branch 'devel' of github.com:arangodb/arangodb into feature/use…
goedderz Feb 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Return a string_view in Result::errorMessage
  • Loading branch information
goedderz committed Jan 25, 2021
commit 83bb4f8dd4c573c4cc68af4b16ce9c0f9493f6e1
2 changes: 1 addition & 1 deletion arangod/Agency/AgencyComm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ int AgencyCommResult::errorCode() const {
}

std::string AgencyCommResult::errorMessage() const {
return asResult().errorMessage();
return std::string{asResult().errorMessage()};
}

std::pair<std::optional<int>, std::optional<std::string_view>> AgencyCommResult::parseBodyError() const {
Expand Down
10 changes: 6 additions & 4 deletions arangod/Aql/Functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
#endif

using namespace arangodb;
using namespace arangodb::basics;
using namespace arangodb::aql;
using namespace std::chrono;
using namespace date;
Expand Down Expand Up @@ -928,10 +929,11 @@ void getDocumentByIdentifier(transaction::Methods* trx, std::string& collectionN
}
if (res.is(TRI_ERROR_TRANSACTION_UNREGISTERED_COLLECTION)) {
// special error message to indicate which collection was undeclared
THROW_ARANGO_EXCEPTION_MESSAGE(res.errorNumber(),
res.errorMessage() + ": " + collectionName +
" [" + AccessMode::typeString(AccessMode::Type::READ) +
"]");
THROW_ARANGO_EXCEPTION_MESSAGE(
res.errorNumber(),
StringUtils::concatT(res.errorMessage(), ": ", collectionName, " [",
AccessMode::typeString(AccessMode::Type::READ),
"]"));
}
THROW_ARANGO_EXCEPTION(res);
}
Expand Down
9 changes: 6 additions & 3 deletions arangod/Aql/IResearchViewExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@

#include "IResearchViewExecutor.h"

#include "Aql/AqlCall.h"
#include "Aql/ExecutionStats.h"
#include "Aql/OutputAqlItemRow.h"
#include "Aql/Query.h"
#include "Aql/SingleRowFetcher.h"
#include "AqlCall.h"
#include "Basics/StringUtils.h"
#include "IResearch/IResearchCommon.h"
#include "IResearch/IResearchDocument.h"
#include "IResearch/IResearchFilterFactory.h"
Expand Down Expand Up @@ -58,6 +59,7 @@

using namespace arangodb;
using namespace arangodb::aql;
using namespace arangodb::basics;
using namespace arangodb::iresearch;

namespace {
Expand Down Expand Up @@ -609,8 +611,9 @@ void IResearchViewExecutorBase<Impl, Traits>::reset() {
infos().filterCondition().toVelocyPack(builder, true);
THROW_ARANGO_EXCEPTION_MESSAGE(
rv.errorNumber(),
"failed to build filter while querying arangosearch view, query '" +
builder.toJson() + "': " + rv.errorMessage());
StringUtils::concatT("failed to build filter while querying "
"arangosearch view, query '",
builder.toJson(), "': ", rv.errorMessage()));
}

if (infos().volatileSort() || !_isInitialized) {
Expand Down
7 changes: 5 additions & 2 deletions arangod/Aql/IResearchViewOptimizerRules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@

using namespace arangodb::iresearch;
using namespace arangodb::aql;
using namespace arangodb::basics;

namespace {

Expand Down Expand Up @@ -137,8 +138,10 @@ bool optimizeSearchCondition(IResearchViewNode& viewNode, arangodb::aql::QueryCo
*searchCondition.root());

if (filterCreated.fail()) {
THROW_ARANGO_EXCEPTION_MESSAGE(filterCreated.errorNumber(),
"unsupported SEARCH condition: " + filterCreated.errorMessage());
THROW_ARANGO_EXCEPTION_MESSAGE(
filterCreated.errorNumber(),
StringUtils::concatT("unsupported SEARCH condition: ",
filterCreated.errorMessage()));
}
}

Expand Down
2 changes: 1 addition & 1 deletion arangod/Aql/QueryResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ struct QueryResult {
int errorNumber() const { return result.errorNumber(); }
bool is(int errorNumber) const { return result.errorNumber() == errorNumber; }
bool isNot(int errorNumber) const { return !is(errorNumber); }
std::string errorMessage() const { return result.errorMessage(); }
std::string_view errorMessage() const { return result.errorMessage(); }

public:
Result result;
Expand Down
2 changes: 1 addition & 1 deletion arangod/Auth/Handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class HandlerResult {
bool ok() const { return _result.ok(); }
bool fail() const { return _result.fail(); }
int errorNumber() const { return _result.errorNumber(); }
std::string errorMessage() const { return _result.errorMessage(); }
std::string_view errorMessage() const { return _result.errorMessage(); }

protected:
Result _result;
Expand Down
6 changes: 4 additions & 2 deletions arangod/Auth/UserManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,10 @@ static std::shared_ptr<VPackBuilder> QueryAllUsers(application_features::Applica
(queryResult.result.is(TRI_ERROR_QUERY_KILLED))) {
THROW_ARANGO_EXCEPTION(TRI_ERROR_REQUEST_CANCELED);
}
THROW_ARANGO_EXCEPTION_MESSAGE(queryResult.result.errorNumber(),
"Error executing user query: " + queryResult.result.errorMessage());
THROW_ARANGO_EXCEPTION_MESSAGE(
queryResult.result.errorNumber(),
StringUtils::concatT("Error executing user query: ",
queryResult.result.errorMessage()));
}

VPackSlice usersSlice = queryResult.data->slice();
Expand Down
6 changes: 5 additions & 1 deletion arangod/Cluster/AgencyCallbackRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "Basics/Exceptions.h"
#include "Basics/ReadLocker.h"
#include "Basics/Result.h"
#include "Basics/StringUtils.h"
#include "Basics/WriteLocker.h"
#include "Cluster/AgencyCache.h"
#include "Cluster/AgencyCallback.h"
Expand All @@ -42,6 +43,7 @@
#include "RestServer/MetricsFeature.h"

using namespace arangodb;
using namespace arangodb::basics;

AgencyCallbackRegistry::AgencyCallbackRegistry(application_features::ApplicationServer& server,
std::string const& callbackBasePath)
Expand Down Expand Up @@ -88,7 +90,9 @@ Result AgencyCallbackRegistry::registerCallback(std::shared_ptr<AgencyCallback>
}

TRI_ASSERT(res.fail());
res.reset(res.errorNumber(), std::string("registering ") + (local ? "local " : "") + "callback failed: " + res.errorMessage());
res.reset(res.errorNumber(),
StringUtils::concatT("registering ", (local ? "local " : ""),
"callback failed: ", res.errorMessage()));
LOG_TOPIC("b88f4", WARN, Logger::CLUSTER) << res.errorMessage();

{
Expand Down
23 changes: 13 additions & 10 deletions arangod/Cluster/ClusterMethods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3403,7 +3403,7 @@ arangodb::Result lockDBServerTransactions(network::ConnectionPool* pool,
if (finalRes.errorNumber() == TRI_ERROR_LOCAL_LOCK_FAILED) {
c = TRI_ERROR_LOCAL_LOCK_FAILED;
}
finalRes = arangodb::Result(c, finalRes.errorMessage() + ", " + m);
finalRes = arangodb::Result(c, StringUtils::concatT(finalRes.errorMessage(), ", ", m));
}
};
for (Future<network::Response>& f : futures) {
Expand Down Expand Up @@ -3965,7 +3965,8 @@ arangodb::Result hotBackupCoordinator(ClusterFeature& feature, VPackSlice const
if (!result.ok()) {
// Failed to go to backup mode
result.reset(TRI_ERROR_HOT_BACKUP_INTERNAL,
std::string("agency lock operation resulted in ") + result.errorMessage());
StringUtils::concatT("agency lock operation resulted in ",
result.errorMessage()));
LOG_TOPIC("6c73d", ERR, Logger::BACKUP) << result.errorMessage();
events::CreateHotbackup(timeStamp + "_" + backupId, TRI_ERROR_HOT_BACKUP_INTERNAL);
return result;
Expand Down Expand Up @@ -3996,7 +3997,8 @@ arangodb::Result hotBackupCoordinator(ClusterFeature& feature, VPackSlice const
// release the lock
releaseAgencyLock.fire();
result.reset(TRI_ERROR_HOT_BACKUP_INTERNAL,
std::string("failed to acquire agency dump: ") + result.errorMessage());
StringUtils::concatT("failed to acquire agency dump: ",
result.errorMessage()));
LOG_TOPIC("c014d", ERR, Logger::BACKUP) << result.errorMessage();
events::CreateHotbackup(timeStamp + "_" + backupId, TRI_ERROR_HOT_BACKUP_INTERNAL);
return result;
Expand Down Expand Up @@ -4101,9 +4103,9 @@ arangodb::Result hotBackupCoordinator(ClusterFeature& feature, VPackSlice const
releaseAgencyLock.fire();
result.reset(
TRI_ERROR_HOT_BACKUP_INTERNAL,
std::string(
"failed to acquire global transaction lock on all db servers: ") +
result.errorMessage());
StringUtils::concatT(
"failed to acquire global transaction lock on all db servers: ",
result.errorMessage()));
LOG_TOPIC("b7d09", ERR, Logger::BACKUP) << result.errorMessage();
events::CreateHotbackup(timeStamp + "_" + backupId, result.errorNumber());
return result;
Expand All @@ -4119,8 +4121,8 @@ arangodb::Result hotBackupCoordinator(ClusterFeature& feature, VPackSlice const
// release the lock
releaseAgencyLock.fire();
result.reset(TRI_ERROR_HOT_BACKUP_INTERNAL,
std::string("failed to hot backup on all db servers: ") +
result.errorMessage());
StringUtils::concatT(
"failed to hot backup on all db servers: ", result.errorMessage()));
LOG_TOPIC("6b333", ERR, Logger::BACKUP) << result.errorMessage();
removeLocalBackups(pool, backupId, dbServers, dummy);
events::CreateHotbackup(timeStamp + "_" + backupId, result.errorNumber());
Expand All @@ -4138,8 +4140,9 @@ arangodb::Result hotBackupCoordinator(ClusterFeature& feature, VPackSlice const
removeLocalBackups(pool, backupId, dbServers, dummy);
}
result.reset(TRI_ERROR_HOT_BACKUP_INTERNAL,
std::string("failed to acquire agency dump post backup: ") +
result.errorMessage() + " backup's integrity is not guaranteed");
StringUtils::concatT(
"failed to acquire agency dump post backup: ", result.errorMessage(),
" backup's integrity is not guaranteed"));
LOG_TOPIC("d4229", ERR, Logger::BACKUP) << result.errorMessage();
events::CreateHotbackup(timeStamp + "_" + backupId, result.errorNumber());
return result;
Expand Down
3 changes: 2 additions & 1 deletion arangod/Cluster/DBServerAgencySync.cpp
10000
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@

using namespace arangodb;
using namespace arangodb::application_features;
using namespace arangodb::basics;
using namespace arangodb::methods;
using namespace arangodb::rest;

Expand Down Expand Up @@ -345,7 +346,7 @@ DBServerAgencySyncResult DBServerAgencySync::execute() {
} else {
// Report an error:
result = DBServerAgencySyncResult(
false, "Error in phase 2: " + tmp.errorMessage(), 0, 0);
false, StringUtils::concatT("Error in phase 2: ", tmp.errorMessage()), 0, 0);
}
} else {
// This code should never run, it is only there to debug problems if
Expand Down
3 changes: 1 addition & 2 deletions arangod/Cluster/FollowerInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@ Result FollowerInfo::remove(ServerID const& sid) {
_docColl->vocbase().name() + "/" + std::to_string(_docColl->planId().id()) +
": " + TRI_errno_string(agencyRes.errorNumber());
LOG_TOPIC("a0dcc", ERR, Logger::CLUSTER) << errorMessage;
agencyRes.resetErrorMessage<std::string>(std::move(errorMessage));
return agencyRes;
return Result{agencyRes.errorNumber(), std::move(errorMessage)};
}

//////////////////////////////////////////////////////////////////////////////
Expand Down
27 changes: 14 additions & 13 deletions arangod/Cluster/SynchronizeShard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ using namespace arangodb::maintenance;
using namespace arangodb::methods;
using namespace arangodb::transaction;
using namespace arangodb;
using namespace arangodb::basics;
using namespace arangodb::consensus;

std::string const ENDPOINT("endpoint");
Expand Down Expand Up @@ -316,7 +317,7 @@ static arangodb::Result addShardFollower(
}
}
return arangodb::Result(result.errorNumber(),
errorMessage + ", " + result.errorMessage());
StringUtils::concatT(errorMessage, ", ", result.errorMessage()));
}

LOG_TOPIC("79935", DEBUG, Logger::MAINTENANCE) << "addShardFollower: success";
Expand Down Expand Up @@ -977,8 +978,8 @@ ResultT<TRI_voc_tick_t> SynchronizeShard::catchupWithReadLock(
Result res = startReadLockOnLeader(ep, database, collection.name(),
clientId, lockJobId, true, timeout);
if (!res.ok()) {
std::string errorMessage =
"SynchronizeShard: error in startReadLockOnLeader (soft):" + res.errorMessage();
auto errorMessage = StringUtils::concatT(
"SynchronizeShard: error in startReadLockOnLeader (soft):", res.errorMessage());
return ResultT<TRI_voc_tick_t>::error(TRI_ERROR_INTERNAL, errorMessage);
}

Expand Down Expand Up @@ -1034,8 +1035,8 @@ ResultT<TRI_voc_tick_t> SynchronizeShard::catchupWithReadLock(
// We removed the readlock
readLockGuard.cancel();
if (!res.ok()) {
std::string errorMessage =
"synchronizeOneShard: error when cancelling soft read lock: " + res.errorMessage();
auto errorMessage = StringUtils::concatT(
"synchronizeOneShard: error when cancelling soft read lock: ", res.errorMessage());
LOG_TOPIC("c37d1", INFO, Logger::MAINTENANCE) << errorMessage;
_result.reset(TRI_ERROR_INTERNAL, errorMessage);
return ResultT<TRI_voc_tick_t>::error(TRI_ERROR_INTERNAL, errorMessage);
Expand Down Expand Up @@ -1065,9 +1066,9 @@ Result SynchronizeShard::catchupWithExclusiveLock(
Result res = startReadLockOnLeader(ep, database, collection.name(), clientId,
lockJobId, false);
if (!res.ok()) {
std::string errorMessage =
"SynchronizeShard: error in startReadLockOnLeader (hard):" + res.errorMessage();
return {TRI_ERROR_INTERNAL, errorMessage};
auto errorMessage = StringUtils::concatT(
"SynchronizeShard: error in startReadLockOnLeader (hard):", res.errorMessage());
return {TRI_ERROR_INTERNAL, std::move(errorMessage)};
}
auto readLockGuard = arangodb::scopeGuard([&, this]() {
// Always cancel the read lock.
Expand Down Expand Up @@ -1170,11 +1171,11 @@ Result SynchronizeShard::catchupWithExclusiveLock(
auto result = response.combinedResult();

if (result.fail()) {
std::string const errorMessage =
"addShardFollower: could not add us to the leader's follower "
"list for " + database + "/" + shard +
", error while recalculating count on leader: " +
result.errorMessage();
auto const errorMessage = StringUtils::concatT(
"addShardFollower: could not add us to the leader's follower list "
"for ",
database, "/", shard,
", error while recalculating count on leader: ", result.errorMessage());
LOG_TOPIC("22e0b", WARN, Logger::MAINTENANCE) << errorMessage;
return arangodb::Result(result.errorNumber(), errorMessage);
}
Expand Down
15 changes: 8 additions & 7 deletions arangod/IResearch/IResearchAnalyzerFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2218,10 +2218,9 @@ Result IResearchAnalyzerFeature::cleanupAnalyzersCollection(irs::string_ref cons
if (deleteResult.fail()) {
return {
TRI_ERROR_INTERNAL,
"failure to remove dangling analyzers from '" + std::string(database) + "' Aql error: (" +
std::to_string(deleteResult.errorNumber()) + " ) " +
deleteResult.errorMessage()
};
arangodb::basics::StringUtils::concatT(
"failure to remove dangling analyzers from '", database,
"' Aql error: (", deleteResult.errorNumber(), " ) ", deleteResult.errorMessage())};
}

static const auto queryUpdateString = arangodb::aql::QueryString(
Expand All @@ -2236,9 +2235,11 @@ Result IResearchAnalyzerFeature::cleanupAnalyzersCollection(irs::string_ref cons
if (updateResult.fail()) {
return {
TRI_ERROR_INTERNAL,
"failure to restore dangling analyzers from '" + std::string(database) + "' Aql error: (" +
std::to_string(updateResult.errorNumber()) + " ) " +
updateResult.errorMessage()
arangodb::basics::StringUtils::concatT(
"failure to restore dangling analyzers from '", database,
"' Aql error: (", updateResult.errorNumber(), " ) ",
updateResult.errorMessage())

};
}

Expand Down
10 changes: 6 additions & 4 deletions arangod/IResearch/IResearchFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -544,9 +544,10 @@ void registerSingleFactory(
if (!res.ok()) {
THROW_ARANGO_EXCEPTION_MESSAGE(
res.errorNumber(),
std::string("failure registering IResearch link factory with index "
"factory from feature '") +
engine.name() + "': " + res.errorMessage());
arangodb::basics::StringUtils::concatT(
"failure registering IResearch link factory with index "
"factory from feature '",
engine.name(), "': ", res.errorMessage()));< 741A /td>
}
}
}
Expand Down Expand Up @@ -667,7 +668,8 @@ void registerViewFactory(arangodb::application_features::ApplicationServer& serv
if (!res.ok()) {
THROW_ARANGO_EXCEPTION_MESSAGE(
res.errorNumber(),
std::string("failure registering arangosearch view factory: ") + res.errorMessage());
arangodb::basics::StringUtils::concatT(
"failure registering arangosearch view factory: ", res.errorMessage()));
}
}

Expand Down
Loading
0