8000 noexcept requirement ScopeGuard (#14713) · arangodb/arangodb@07bbd47 · GitHub
[go: up one dir, main page]

Skip to content

Commit 07bbd47

Browse files
author
Lars Maier
authored
noexcept requirement ScopeGuard (#14713)
1 parent b2d76d9 commit 07bbd47

File tree

156 files changed

+778
-661
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+778
-661
lines changed

arangod/Agency/AgencyComm.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,9 +1199,8 @@ AgencyCommResult AgencyComm::sendWithFailover(arangodb::rest::RequestType method
11991199

12001200
auto started = std::chrono::steady_clock::now();
12011201

1202-
TRI_DEFER({
1202+
auto sg = ScopeGuard([&]() noexcept {
12031203
auto end = std::chrono::steady_clock::now();
1204-
12051204
_agency_comm_request_time_ms.count(std::chrono::duration_cast<std::chrono::milliseconds>(end - started).count());
12061205
});
12071206

arangod/Agency/Agent.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ trans_ret_t Agent::transact(query_t const& queries) {
11871187
size_t failed;
11881188
auto ret = std::make_shared<arangodb::velocypack::Builder>();
11891189
{
1190-
TRI_DEFER(removeTrxsOngoing(qs));
1190+
auto sg = arangodb::scopeGuard([&]() noexcept { removeTrxsOngoing(qs); });
11911191
// Note that once the transactions are in our log, we can remove them
11921192
// from the list of ongoing ones, although they might not yet be committed.
11931193
// This is because then, inquire will find them in the log and draw its
@@ -1362,16 +1362,16 @@ write_ret_t Agent::write(query_t const& query, WriteMode const& wmode) {
13621362
}
13631363

13641364
{
1365-
addTrxsOngoing(query->slice()); // remember that these are ongoing
1366-
TRI_DEFER(removeTrxsOngoing(query->slice()));
1365+
auto slice = query->slice();
1366+
addTrxsOngoing(slice); // remember that these are ongoing
1367+
auto sg = arangodb::scopeGuard([&]() noexcept { removeTrxsOngoing(slice); });
13671368
// Note that once the transactions are in our log, we can remove them
13681369
// from the list of ongoing ones, although they might not yet be committed.
13691370
// This is because then, inquire will find them in the log and draw its
13701371
// own conclusions. The map of ongoing trxs is only to cover the time
13711372
// from when we receive the request until we have appended the trxs
13721373
// ourselves.
13731374

1374-
auto slice = query->slice();
13751375
size_t ntrans = slice.length();
13761376
size_t npacks = ntrans / _config.maxAppendSize();
13771377
if (ntrans % _config.maxAppendSize() != 0) {
@@ -2379,7 +2379,7 @@ void Agent::addTrxsOngoing(Slice trxs) {
23792379
}
23802380
}
23812381

2382-
void Agent::removeTrxsOngoing(Slice trxs) {
2382+
void Agent::removeTrxsOngoing(Slice trxs) noexcept {
23832383
try {
23842384
MUTEX_LOCKER(guard, _trxsLock);
23852385
for (auto const& trx : VPackArrayIterator(trxs)) {

arangod/Agency/Agent.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class Agent final : public arangodb::Thread, public AgentInterface {
135135
void addTrxsOngoing(Slice trxs);
136136

137137
/// @brief Remove trxs from list of ongoing ones.
138-
void removeTrxsOngoing(Slice trxs);
138+
void removeTrxsOngoing(Slice trxs) noexcept;
139139

140140
/// @brief Check whether a trx is ongoing.
141141
bool isTrxOngoing(std::string& id);

arangod/Aql/AstNode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2638,7 +2638,7 @@ void AstNode::appendValue(arangodb::basics::StringBuffer* buffer) const {
26382638
}
26392639
}
26402640

2641-
void AstNode::markFinalized(AstNode* subtreeRoot) {
2641+
void AstNode::markFinalized(AstNode* subtreeRoot) noexcept {
26422642
if ((nullptr == subtreeRoot) || subtreeRoot->hasFlag(AstNodeFlagType::FLAG_FINALIZED)) {
26432643
return;
26442644
}

arangod/Aql/AstNode.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ struct AstNode {
562562
/// If it runs into a finalized node, it assumes the whole subtree beneath
563563
/// it is marked already and exits early; otherwise it will finalize the node
564564
/// and recurse on its subtree.
565-
static void markFinalized(AstNode* subtreeRoot);
565+
static void markFinalized(AstNode* subtreeRoot) noexcept;
566566

567567
/// @brief sets the computed value pointer.
568568
void setComputedValue(uint8_t* data);
@@ -655,7 +655,7 @@ std::ostream& operator<<(std::ostream&, arangodb::aql::AstNode const&);
655655
if (wasFinalizedAlready) { \
656656
(n)->flags = ((n)->flags & ~arangodb::aql::AstNodeFlagType::FLAG_FINALIZED); \
657657
} \
658-
TRI_DEFER(FINALIZE_SUBTREE_CONDITIONAL(n, wasFinalizedAlready));
658+
auto sg = arangodb::scopeGuard([&]() noexcept { FINALIZE_SUBTREE_CONDITIONAL(n, wasFinalizedAlready); });
659659
#else
660660
#define FINALIZE_SUBTREE(n) \
661661
while (0) { \

arangod/Aql/AstResources.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ char* AstResources::registerLongString(char* copy, size_t length) {
141141
THROW_ARANGO_EXCEPTION(TRI_ERROR_OUT_OF_MEMORY);
142142
}
143143

144-
auto guard = scopeGuard([copy]() {
144+
auto guard = scopeGuard([copy]() noexcept {
145145
// in case something goes wrong, we must free the string we got to prevent
146146
// memleaks
147147
TRI_FreeString(copy);

arangod/Aql/BlocksWithClients.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,9 @@ auto BlocksWithClientsImpl<Executor>::executeForClient(AqlCallStack stack,
161161
_executor.acquireLock();
162162
}
163163

164-
auto guard = scopeGuard([this]() {
164+
auto guard = scopeGuard([&]() noexcept {
165165
if constexpr (std::is_same<MutexExecutor, Executor>::value) {
166166
_executor.releaseLock();
167-
} else {
168-
// mark "this" as unused. unfortunately we cannot use [[maybe_unsed]]
169-
// in the lambda capture as it does not parse
170-
(void) this;
171167
}
172168
});
173169

arangod/Aql/CalculationExecutor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ void CalculationExecutor<calculationType>::enterContext() {
130130

131131
template <CalculationType calculationType>
132132
template <CalculationType U, typename>
133-
void CalculationExecutor<calculationType>::exitContext() {
133+
void CalculationExecutor<calculationType>::exitContext() noexcept {
134134
if (shouldExitContextBetweenBlocks()) {
135135
// must invalidate the expression now as we might be called from
136136
// different threads
@@ -140,7 +140,7 @@ void CalculationExecutor<calculationType>::exitContext() {
140140
}
141141

142142
template <CalculationType calculationType>
143-
bool CalculationExecutor<calculationType>::shouldExitContextBetweenBlocks() const {
143+
bool CalculationExecutor<calculationType>::shouldExitContextBetweenBlocks() const noexcept {
144144
static bool const isRunningInCluster = ServerState::instance()->isRunningInCluster();
145145
bool const stream = _infos.getQuery().queryOptions().stream;
146146

@@ -198,7 +198,7 @@ void CalculationExecutor<CalculationType::V8Condition>::doEvaluation(InputAqlIte
198198
_hasEnteredContext == !input.isFirstDataRowInBlock());
199199

200200
enterContext();
201-
auto contextGuard = scopeGuard([this]() { exitContext(); });
201+
auto contextGuard = scopeGuard([this]() noexcept { exitContext(); });
202202

203203
ISOLATE;
204204
v8::HandleScope scope(isolate); // do not delete this!

arangod/Aql/CalculationExecutor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ class CalculationExecutor {
116116

117117
// Only for V8Conditions
118118
template <CalculationType U = calculationType, typename = std::enable_if_t<U == CalculationType::V8Condition>>
119-
void exitContext();
119+
void exitContext() noexcept;
120120

121-
[[nodiscard]] bool shouldExitContextBetweenBlocks() const;
121+
[[nodiscard]] bool shouldExitContextBetweenBlocks() const noexcept;
122122

123123
private:
124124
transaction::Methods _trx;

arangod/Aql/Condition.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ bool Condition::removeInvalidVariables(VarSet const& validVars) {
997997

998998
auto oldRoot = _root;
999999
_root = _ast->shallowCopyForModify(oldRoot);
1000-
TRI_DEFER(FINALIZE_SUBTREE(_root));
1000+
auto sg = arangodb::scopeGuard([&]() noexcept { FINALIZE_SUBTREE(_root); });
10011001

10021002
bool isEmpty = false;
10031003

@@ -1008,7 +1008,7 @@ bool Condition::removeInvalidVariables(VarSet const& validVars) {
10081008
for (size_t i = 0; i < n; ++i) {
10091009
auto oldAndNode = _root->getMemberUnchecked(i);
10101010
auto andNode = _ast->shallowCopyForModify(oldAndNode);
1011-
TRI_DEFER(FINALIZE_SUBTREE(andNode));
1011+
auto sg = arangodb::scopeGuard([&]() noexcept { FINALIZE_SUBTREE(andNode); });
10121012
_root->changeMember(i, andNode);
10131013

10141014
TRI_ASSERT(andNode->type == NODE_TYPE_OPERATOR_NARY_AND);
@@ -1054,7 +1054,7 @@ void Condition::deduplicateComparisonsRecursive(AstNode* p) {
10541054
auto op = p->getMemberUnchecked(j);
10551055
auto newNode = _ast->shallowCopyForModify(op);
10561056
p->changeMember(j, newNode);
1057-
TRI_DEFER(FINALIZE_SUBTREE(newNode));
1057+
auto sg = arangodb::scopeGuard([&]() noexcept { FINALIZE_SUBTREE(newNode); });
10581058
if (newNode->type == NODE_TYPE_OPERATOR_BINARY_IN) {
10591059
auto deduplicated = deduplicateInOperation(newNode);
10601060
p->changeMember(j, deduplicated);
@@ -1074,7 +1074,7 @@ void Condition::deduplicateComparisonsRecursive(AstNode* p) {
10741074
void Condition::optimizeNonDnf() {
10751075
auto oldRoot = _root;
10761076
_root = _ast->shallowCopyForModify(oldRoot);
1077-
TRI_DEFER(FINALIZE_SUBTREE(_root));
1077+
auto sg = arangodb::scopeGuard([&, this]() noexcept { FINALIZE_SUBTREE(_root); });
10781078
// Sorting and deduplicating all IN/AND/OR nodes
10791079
deduplicateComparisonsRecursive(_root);
10801080
}
@@ -1174,7 +1174,7 @@ void Condition::optimize(ExecutionPlan* plan, bool multivalued) {
11741174

11751175
auto oldRoot = _root;
11761176
_root = _ast->shallowCopyForModify(oldRoot);
1177-
TRI_DEFER(FINALIZE_SUBTREE(_root));
1177+
auto sg = arangodb::scopeGuard([&]() noexcept { FINALIZE_SUBTREE(_root); });
11781178

11791179
std::pair<Variable const*, std::vector<arangodb::basics::AttributeName>> varAccess;
11801180

@@ -1190,7 +1190,7 @@ void Condition::optimize(ExecutionPlan* plan, bool multivalued) {
11901190
TRI_ASSERT(oldAnd->type == NODE_TYPE_OPERATOR_NARY_AND);
11911191
auto andNode = _ast->shallowCopyForModify(oldAnd);
11921192
_root->changeMember(r, andNode);
1193-
TRI_DEFER(FINALIZE_SUBTREE(andNode));
1193+
auto sg = arangodb::scopeGuard([&]() noexcept { FINALIZE_SUBTREE(andNode); });
11941194

11951195
restartThisOrItem:
11961196
size_t andNumMembers = andNode->numMembers();
@@ -1322,7 +1322,7 @@ void Condition::optimize(ExecutionPlan* plan, bool multivalued) {
13221322
// copy & modify leftNode
13231323
auto oldLeft = andNode->getMemberUnchecked(leftPos);
13241324
auto leftNode = _ast->shallowCopyForModify(oldLeft);
1325-
TRI_DEFER(FINALIZE_SUBTREE(leftNode));
1325+
auto sg = arangodb::scopeGuard([&]() noexcept { FINALIZE_SUBTREE(leftNode); });
13261326
andNode->changeMember(leftPos, leftNode);
13271327

13281328
ConditionPart current(variable, attributeName, leftNode, positions[0].second, nullptr);
@@ -1436,7 +1436,7 @@ void Condition::optimize(ExecutionPlan* plan, bool multivalued) {
14361436
for (size_t iMemb = 0; iMemb < origNode->numMembers(); iMemb++) {
14371437
newNode->addMember(origNode->getMemberUnchecked(iMemb));
14381438
}
1439-
TRI_DEFER(FINALIZE_SUBTREE(newNode));
1439+
auto sg = arangodb::scopeGuard([&]() noexcept { FINALIZE_SUBTREE(newNode); });
14401440

14411441
andNode->changeMember(positions.at(0).first, newNode);
14421442
goto restartThisOrItem;
@@ -1630,7 +1630,7 @@ AstNode* Condition::deduplicateInOperation(AstNode* operation) {
16301630
if (deduplicated != rhs) {
16311631
// there were duplicates
16321632
auto newOperation = _ast->shallowCopyForModify(operation);
1633-
TRI_DEFER(FINALIZE_SUBTREE(newOperation));
1633+
auto sg = arangodb::scopeGuard([&]() noexcept { FINALIZE_SUBTREE(newOperation); });
16341634

16351635
newOperation->changeMember(1, const_cast<AstNode*>(deduplicated));
16361636
return newOperation;
@@ -1691,7 +1691,7 @@ AstNode* switchSidesInCompare(Ast* ast, AstNode* node) {
16911691
auto second = node->getMemberUnchecked(1);
16921692

16931693
auto newOperator = ast->shallowCopyForModify(node);
1694-
TRI_DEFER(FINALIZE_SUBTREE(newOperator));
1694+
auto sg = arangodb::scopeGuard([&]() noexcept { FINALIZE_SUBTREE(newOperator); });
16951695

16961696
newOperator->changeMember(0, second);
16971697
newOperator->changeMember(1, first);
@@ -1824,7 +1824,7 @@ AstNode* Condition::transformNodePostorder(
18241824
if (node->type == NODE_TYPE_OPERATOR_NARY_AND) {
18251825
auto old = node;
18261826
node = _ast->shallowCopyForModify(old);
1827-
TRI_DEFER(FINALIZE_SUBTREE(node));
1827+
auto sg = arangodb::scopeGuard([&]() noexcept { FINALIZE_SUBTREE(node); });
18281828

18291829
bool distributeOverChildren = false;
18301830
bool mustCollapse = false;
@@ -1931,7 +1931,7 @@ AstNode* Condition::transformNodePostorder(
19311931
if (node->type == NODE_TYPE_OPERATOR_NARY_OR) {
19321932
auto old = node;
19331933
node = _ast->shallowCopyForModify(old);
1934-
TRI_DEFER(FINALIZE_SUBTREE(node));
1934+
auto sg = arangodb::scopeGuard([&]() noexcept { FINALIZE_SUBTREE(node); });
19351935

19361936
size_t const n = node->numMembers();
19371937
bool mustCollapse = false;
@@ -1981,7 +1981,7 @@ AstNode* Condition::fixRoot(AstNode* node, int level) {
19811981

19821982
auto old = node;
19831983
node = _ast->shallowCopyForModify(old);
1984-
TRI_DEFER(FINALIZE_SUBTREE(node));
1984+
auto sg = arangodb::scopeGuard([&]() noexcept { FINALIZE_SUBTREE(node); });
19851985

19861986
for (size_t i = 0; i < n; ++i) {
19871987
auto sub = node->getMemberUnchecked(i);

arangod/Aql/EngineInfoContainerDBServerServerBased.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ Result EngineInfoContainerDBServerServerBased::buildEngines(
410410

411411
ErrorCode cleanupReason = TRI_ERROR_CLUSTER_TIMEOUT;
412412

413-
auto cleanupGuard = scopeGuard([this, &serverToQueryId, &cleanupReason]() {
413+
auto cleanupGuard = scopeGuard([this, &serverToQueryId, &cleanupReason]() noexcept {
414414
try {
415415
transaction::Methods& trx = _query.trxForOptimization();
416416
auto requests = cleanupEngines(cleanupReason, _query.vocbase().name(), serverToQueryId);
@@ -444,7 +444,7 @@ Result EngineInfoContainerDBServerServerBased::buildEngines(
444444
// DB server(s).
445445
_query.queryOptions().ttl = std::max<double>(oldTtl, transaction::Manager::idleTTLDBServer);
446446

447-
auto ttlGuard = scopeGuard([this, oldTtl]() {
447+
auto ttlGuard = scopeGuard([this, oldTtl]() noexcept {
448448
// restore previous TTL value
449449
_query.queryOptions().ttl = oldTtl;
450450
});

arangod/Aql/ExecutionBlockImpl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ auto ExecutionBlockImpl<Executor>::executeSkipRowsRange(typename Fetcher::DataRa
824824
-> std::tuple<ExecutorState, typename Executor::Stats, size_t, AqlCallType> {
825825
// The skippedRows is a temporary counter used in this function
826826
// We need to make sure to reset it afterwards.
827-
TRI_DEFER(call.resetSkipCount());
827+
auto sg = arangodb::scopeGuard([&]() noexcept { call.resetSkipCount(); });
828828
if constexpr (skipRowsType<Executor>() == SkipRowsRangeVariant::EXECUTOR) {
829829
if constexpr (isMultiDepExecutor<Executor>) {
830830
TRI_ASSERT(inputRange.numberDependencies() == _dependencies.size());
@@ -1414,7 +1414,7 @@ ExecutionBlockImpl<Executor>::executeWithoutTrace(AqlCallStack const& callStack)
14141414
size_t skippedLocal = 0;
14151415
AqlCallType call{};
14161416
if constexpr (executorCanReturnWaiting<Executor>) {
1417-
TRI_DEFER(ctx.clientCall.resetSkipCount());
1417+
auto sg = arangodb::scopeGuard([&]() noexcept { ctx.clientCall.resetSkipCount(); });
14181418
ExecutionState executorState = ExecutionState::HASMORE;
14191419
std::tie(executorState, stats, skippedLocal, call) =
14201420
_executor.skipRowsRange(_lastRange, ctx.clientCall);
@@ -1557,7 +1557,7 @@ ExecutionBlockImpl<Executor>::executeWithoutTrace(AqlCallStack const& callStack)
15571557
<< printTypeInfo() << " all produced, fast forward to end up (sub-)query.";
15581558

15591559
AqlCall callCopy = ctx.clientCall;
1560-
TRI_DEFER(ctx.clientCall.resetSkipCount());
1560+
auto sg = arangodb::scopeGuard([&]() noexcept { ctx.clientCall.resetSkipCount(); });
15611561
if constexpr (executorHasSideEffects<Executor>) {
15621562
if (ctx.stack.needToSkipSubquery()) {
15631563
// Fast Forward call.

arangod/Aql/Expression.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ AqlValue Expression::execute(ExpressionContext* ctx, bool& mustDestroy) {
9999
TRI_ASSERT(_type != UNPROCESSED);
100100

101101
_expressionContext = ctx;
102-
auto guard = scopeGuard([this] {
102+
auto guard = scopeGuard([this]() noexcept {
103103
_expressionContext = nullptr;
104104
});
105105

@@ -945,7 +945,7 @@ AqlValue Expression::executeSimpleExpressionFCallJS(AstNode const* node,
945945

946946
auto old = v8g->_expressionContext;
947947
v8g->_expressionContext = _expressionContext;
948-
TRI_DEFER(v8g->_expressionContext = old);
948+
auto sg = arangodb::scopeGuard([&]() noexcept { v8g->_expressionContext = old; });
949949

950950
std::string jsName;
951951
size_t const n = member->numMembers();

arangod/Aql/Functions.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ AqlValue callApplyBackend(ExpressionContext* expressionContext, AstNode const& n
11151115

11161116
auto old = v8g->_expressionContext;
11171117
v8g->_expressionContext = expressionContext;
1118-
TRI_DEFER(v8g->_expressionContext = old);
1118+
auto sg = arangodb::scopeGuard([&]() noexcept { v8g->_expressionContext = old; });
11191119

11201120
VPackOptions const& options = trx.vpackOptions();
11211121
std::string jsName;
@@ -8264,7 +8264,7 @@ AqlValue Functions::Apply(ExpressionContext* expressionContext, AstNode const& n
82648264
AqlValue rawParamArray;
82658265
std::vector<bool> mustFree;
82668266

8267-
auto guard = scopeGuard([&mustFree, &invokeParams]() {
8267+
auto guard = scopeGuard([&mustFree, &invokeParams]() noexcept {
82688268
for (size_t i = 0; i < mustFree.size(); ++i) {
82698269
if (mustFree[i]) {
82708270
invokeParams[i].destroy();
@@ -8578,7 +8578,7 @@ AqlValue Functions::SchemaValidate(ExpressionContext* expressionContext,
85788578

85798579
Result res;
85808580
{
8581-
arangodb::ScopeGuard guardi([storedLevel, &validator]{
8581+
arangodb::ScopeGuard guard([storedLevel, &validator]() noexcept {
85828582
validator->setLevel(storedLevel);
85838583
});
85848584

arangod/Aql/IResearchViewOptimizerRules.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ void lateDocumentMaterializationArangoSearchRule(Optimizer* opt,
515515
std::unique_ptr<ExecutionPlan> plan,
516516
OptimizerRule const& rule) {
517517
auto modified = false;
518-
auto const addPlan = arangodb::scopeGuard([opt, &plan, &rule, &modified]() {
518+
auto const addPlan = arangodb::scopeGuard([opt, &plan, &rule, &modified]() noexcept {
519519
opt->addPlan(std::move(plan), rule, modified);
520520
});
521521
// arangosearch view node supports late materialization

arangod/Aql/IndexExecutor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ void IndexExecutor::initIndexes(InputAqlItemRow& input) {
564564
};
565565

566566
_infos.query().enterV8Context();
567-
TRI_DEFER(cleanup());
567+
auto sg = arangodb::scopeGuard([&]() noexcept { cleanup(); });
568568

569569
ISOLATE;
570570
v8::HandleScope scope(isolate); // do not delete this!

arangod/Aql/IndexNodeOptimizerRules.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void arangodb::aql::lateDocumentMaterializationRule(Optimizer* opt,
9191
std::unique_ptr<ExecutionPlan> plan,
9292
OptimizerRule const& rule) {
9393
auto modified = false;
94-
auto const addPlan = arangodb::scopeGuard([opt, &plan, &rule, &modified]() {
94+
auto const addPlan = arangodb::scopeGuard([opt, &plan, &rule, &modified]() noexcept {
9595
opt->addPlan(std::move(plan), rule, modified);
9696
});
9797
// index node supports late materialization

arangod/Aql/MutexExecutor.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,13 @@ class MutexExecutor {
6868
auto distributeBlock(SharedAqlItemBlockPtr const& block, SkipResult skipped,
6969
std::unordered_map<std::string, ClientBlockData>& blockMap) -> void;
7070

71-
void acquireLock() {
71+
void acquireLock() noexcept {
72+
// don't continue if locking fails
7273
_mutex.lock();
7374
}
7475

75-
void releaseLock() {
76+
void releaseLock() noexcept {
77+
// don't continue if locking fails
7678
_mutex.unlock();
7779
}
7880

0 commit comments

Comments
 (0)
0