8000 Improve syncer error message by graetzer · Pull Request #10403 · arangodb/arangodb · GitHub
[go: up one dir, main page]

Skip to content

Improve syncer error message #10403

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 1 commit into from
Nov 12, 2019
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
Improve syncer error message
  • Loading branch information
graetzer committed Nov 12, 2019
commit 0a04067153356e035be35f42e890c7a02592985c
2 changes: 2 additions & 0 deletions arangod/Replication/utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,8 @@ Result parseResponse(velocypack::Builder& builder,
velocypack::Parser parser(builder);
parser.parse(response->getBody().begin(), response->getBody().length());
return Result();
} catch (VPackException const& e) {
return Result(TRI_ERROR_REPLICATION_INVALID_RESPONSE, e.what());
} catch (...) {
return Result(TRI_ERROR_REPLICATION_INVALID_RESPONSE);
}
Expand Down
6 changes: 3 additions & 3 deletions arangod/RocksDBEngine/RocksDBIncrementalSync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ Result syncChunkRocksDB(DatabaseInitialSyncer& syncer, SingleCollectionTransacti
if (r.fail()) {
return Result(TRI_ERROR_REPLICATION_INVALID_RESPONSE,
std::string("got invalid response from master at ") +
syncer._state.master.endpoint + ": response is no array");
syncer._state.master.endpoint + ": " + r.errorMessage());
}

VPackSlice const responseBody = builder.slice();
Expand Down Expand Up @@ -426,7 +426,7 @@ Result syncChunkRocksDB(DatabaseInitialSyncer& syncer, SingleCollectionTransacti
return Result(TRI_ERROR_REPLICATION_INVALID_RESPONSE,
std::string("got invalid response from master at ") +
syncer._state.master.endpoint +
": response is no array");
": " + r.errorMessage());
}

VPackSlice const slice = docsBuilder->slice();
Expand Down Expand Up @@ -614,7 +614,7 @@ Result handleSyncKeysRocksDB(DatabaseInitialSyncer& syncer,
if (r.fail()) {
return Result(TRI_ERROR_REPLICATION_INVALID_RESPONSE,
std::string("got invalid response from master at ") +
syncer._state.master.endpoint + ": response is no array");
syncer._state.master.endpoint + ": " + r.errorMessage());
}

VPackSlice const chunkSlice = builder.slice();
Expand Down
0