8000 Slightly improve specific warning messages for better readability. (#… · arangodb/arangodb@ab350ce · GitHub
[go: up one dir, main page]

Skip to content

Commit ab350ce

Browse files
authored
Slightly improve specific warning messages for better readability. (#14360)
1 parent 0e20844 commit ab350ce

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
devel
22
-----
33

4+
* Slightly improve specific warning messages for better readability.
5+
46
* Fix URL request parsing in case data is handed in in small chunks.
57
Previously the URL could be cut off if the chunk size was smaller than
68
the URL size.

arangod/Cluster/Maintenance.cpp

Lines change 10000 d: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,6 +1473,14 @@ arangodb::Result arangodb::maintenance::reportInCurrent(
14731473
std::vector<std::string> const planPath {
14741474
AgencyCommHelper::path(), PLAN, COLLECTIONS, d, c, "shards", s};
14751475

1476+
if (!pdb.isObject()) {
1477+
LOG_TOPIC("2647d", WARN, Logger::MAINTENANCE)
1478+
<< "plan database in error reporting struct is not an object: " << pdb.toJson();
1479+
}
1480+
if (!ldb.isObject()) {
1481+
LOG_TOPIC("8fe58", WARN, Logger::MAINTENANCE)
1482+
<< "local database in error reporting struct is not an object: " << ldb.toJson();
1483+
}
14761484
TRI_ASSERT(pdb.isObject());
14771485
TRI_ASSERT(ldb.isObject());
14781486
if (pdb.hasKey(planPath) && !ldb.hasKey(s)) {

arangod/Cluster/SynchronizeShard.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,12 +1336,18 @@ void SynchronizeShard::setState(ActionState state) {
13361336
while (!_feature.server().isStopping() && clock::now() < stoppage) {
13371337
cluster::fetchCurrentVersion(0.1 * timeout)
13381338
.thenValue(
1339-
[&v] (auto&& res) { v = res.get(); })
1339+
[&v] (auto&& res) {
1340+
// we need to check if res is ok() in order to not trigger a
1341+
// bad_optional_access exception here
1342+
if (res.ok()) {
1343+
v = res.get();
1344+
}
1345+
})
13401346
.thenError<std::exception>(
13411347
[this] (std::exception const& e) {
13421348
LOG_TOPIC("3ae99", ERR, Logger::CLUSTER)
13431349
<< "Failed to acquire current version from agency while increasing shard version"
1344-
<< " for shard " << getDatabase() << "/" << getShard() << e.what();
1350+
<< " for shard " << getDatabase() << "/" << getShard() << ": " << e.what();
13451351
})
13461352
.wait();
13471353
if (v > 0) {

arangod/Scheduler/SchedulerFeature.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ extern "C" void c_exit_handler(int signal, siginfo_t* info, void*) {
383383
application_features::ApplicationServer::CTRL_C.store(true);
384384
} else {
385385
LOG_TOPIC("11ca3", FATAL, arangodb::Logger::FIXME)
386-
<< signals::name(signal) << "received during shutdown sequence (sender pid "
386+
<< signals::name(signal) << " received during shutdown sequence (sender pid "
387387
<< info->si_pid << "), terminating!";
388388
FATAL_ERROR_EXIT();
389389
}

0 commit comments

Comments
 (0)
0