8000 broken hotbackup list with (#9956) · distrubuted/arangodb@3011846 · GitHub 10000
[go: up one dir, main page]

Skip to content

Commit 3011846

Browse files
kvahedneunhoef
authored andcommitted
broken hotbackup list with (arangodb#9956)
* fix broken list of non existing id
1 parent d25ea0e commit 3011846

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

arangod/Cluster/ClusterMethods.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3230,12 +3230,13 @@ arangodb::Result hotBackupList(std::vector<ServerID> const& dbServers, VPackSlic
32303230

32313231
LOG_TOPIC("410a1", DEBUG, Logger::BACKUP) << "Got " << nrGood << " of " << requests.size() << " lists of local backups";
32323232

3233-
if (nrGood < requests.size()) {
3233+
// Any error if no id presented
3234+
if (payload.isObject() && !payload.hasKey("id") && nrGood < requests.size()) {
32343235
return arangodb::Result(
32353236
TRI_ERROR_HOT_BACKUP_DBSERVERS_AWOL,
32363237
std::string("not all db servers could be reached for backup listing"));
32373238
}
3238-
3239+
32393240
// Now check results
32403241
for (auto const& req : requests) {
32413242
auto res = req.result;
@@ -4252,6 +4253,12 @@ arangodb::Result listHotBackupsOnCoordinator(VPackSlice const payload, VPackBuil
42524253
result = hotBackupList(dbServers, payload, list, dummy);
42534254

42544255
if (!result.ok()) {
4256+
4257+
if (payload.isObject() && payload.hasKey("id") && result.is(TRI_ERROR_HTTP_NOT_FOUND)) {
4258+
auto error = std::string("failed to locate backup ") + payload.get("id").copyString();
4259+
LOG_TOPIC("2020b", DEBUG, Logger::BACKUP) << error;
4260+
return arangodb::Result(TRI_ERROR_HTTP_NOT_FOUND, error);
4261+
}
42554262
if (steady_clock::now() > timeout) {
42564263
return arangodb::Result(
42574264
TRI_ERROR_CLUSTER_TIMEOUT, "timeout waiting for all db servers to report backup list");

0 commit comments

Comments
 (0)
0