From cefe912fd7bdd19386c655bb2b030d84c2635f06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20G=C3=B6dderz?= Date: Fri, 11 Jun 2021 16:17:12 +0200 Subject: [PATCH 1/2] Fixed a velocypack type error in maintenance::reportInCurrent --- arangod/Cluster/Maintenance.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arangod/Cluster/Maintenance.cpp b/arangod/Cluster/Maintenance.cpp index 908d05365dd2..4c71480e58e0 100644 --- a/arangod/Cluster/Maintenance.cpp +++ b/arangod/Cluster/Maintenance.cpp @@ -1466,7 +1466,9 @@ arangodb::Result arangodb::maintenance::reportInCurrent( std::string c = key.substr(pos + 1, pos2); std::string s = key.substr(pos2 + 1); // shard name - auto const pdb = pit->second->slice(); + TRI_ASSERT(pit->second->slice().isArray()); + TRI_ASSERT(pit->second->slice().length() == 1); + auto const pdb = pit->second->slice()[0]; auto const ldb = lit->second->slice(); // Now find out if the shard appears in the Plan but not in Local: From ee4a7ae5199b4c938842a24c042248667602eaba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20G=C3=B6dderz?= Date: Fri, 11 Jun 2021 16:29:52 +0200 Subject: [PATCH 2/2] Added CHANGELOG entry --- CHANGELOG | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 1b06467129a3..4c539d9f41c7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,13 @@ devel ----- +* Fixes a bug in the maintenance's error-handling code. A shard error would + result in log messages like + WARNING [ceb1a] {maintenance} caught exception in Maintenance shards error reporting: Expecting Object + ERROR [c9a75] {maintenance} Error reporting in current: Expecting Object + and also prevent the maintenance from reporting the current state to the + agency, which in turn can prevent cluster-wide progress of various actions. + * Backport bugfix from upstream rocksdb repository for calculating the free disk space for the database directory. Before the bugfix, rocksdb could overestimate the amount of free space when the arangod process