8000 Slightly improve specific warning messages for better readability. by jsteemann · Pull Request #14360 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Slightly improve specific warning messages for better readability. #14360

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 2 commits into from
Jun 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
devel
-----

* Slightly improve specific warning messages for better readability.

* Fix URL request parsing in case data is handed in in small chunks.
Previously the URL could be cut off if the chunk size was smaller than
the URL size.
Expand Down
8 changes: 8 additions & 0 deletions arangod/Cluster/Maintenance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1473,6 +1473,14 @@ arangodb::Result arangodb::maintenance::reportInCurrent(
std::vector<std::string> const planPath {
AgencyCommHelper::path(), PLAN, COLLECTIONS, d, c, "shards", s};

if (!pdb.isObject()) {
LOG_TOPIC("2647d", WARN, Logger::MAINTENANCE)
<< "plan database in error reporting struct is not an object: " << pdb.toJson();
}
if (!ldb.isObject()) {
LOG_TOPIC("8fe58", WARN, Logger::MAINTENANCE)
<< "local database in error reporting struct is not an object: " << ldb.toJson();
}
TRI_ASSERT(pdb.isObject());
TRI_ASSERT(ldb.isObject());
if (pdb.hasKey(planPath) && !ldb.hasKey(s)) {
Expand Down
10 changes: 8 additions & 2 deletions arangod/Cluster/SynchronizeShard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1336,12 +1336,18 @@ void SynchronizeShard::setState(ActionState state) {
while (!_feature.server().isStopping() && clock::now() < stoppage) {
cluster::fetchCurrentVersion(0.1 * timeout)
.thenValue(
[&v] (auto&& res) { v = res.get(); })
[&v] (auto&& res) {
// we need to check if res is ok() in order to not trigger a
// bad_optional_access exception here
if (res.ok()) {
v = res.get();
}
})
.thenError<std::exception>(
[this] (std::exception const& e) {
LOG_TOPIC("3ae99", ERR, Logger::CLUSTER)
<< "Failed to acquire current version from agency while increasing shard version"
<< " for shard " << getDatabase() << "/" << getShard() << e.what();
<< " for shard " << getDatabase() << "/" << getShard() << ": " << e.what();
})
.wait();
if (v > 0) {
Expand Down
2 changes: 1 addition & 1 deletion arangod/Scheduler/SchedulerFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ extern "C" void c_exit_handler(int signal, siginfo_t* info, void*) {
application_features::ApplicationServer::CTRL_C.store(true);
} else {
LOG_TOPIC("11ca3", FATAL, arangodb::Logger::FIXME)
<< signals::name(signal) << "received during shutdown sequence (sender pid "
<< signals::name(signal) << " received during shutdown sequence (sender pid "
<< info->si_pid << "), terminating!";
FATAL_ERROR_EXIT();
}
Expand Down
0