Skip to content

Commit

Permalink
disabled grpc client retry for unavailable status
Browse files Browse the repository at this point in the history
Signed-off-by: Mikhail Boldyrev <miboldyrev@gmail.com>
  • Loading branch information
MBoldyrev authored and lebdron committed Aug 29, 2019
1 parent ec3db19 commit 82ed36b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions irohad/network/impl/grpc_channel_builder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ namespace iroha {
"UNKNOWN",
"DEADLINE_EXCEEDED",
"ABORTED",
"INTERNAL",
"UNAVAILABLE"
"INTERNAL"
]
},
"maxRequestMessageBytes": %2%,
Expand Down
4 changes: 2 additions & 2 deletions test/integration/grpc_retry_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class MockQueryService : public iroha::protocol::QueryService_v1::Service {
iroha::protocol::QueryResponse *response) override {
if (attempts_ < max_attempts_) {
attempts_++;
return grpc::Status(grpc::StatusCode::UNAVAILABLE, kErrorMessage);
return grpc::Status(grpc::StatusCode::ABORTED, kErrorMessage);
}
return grpc::Status::OK;
}
Expand Down Expand Up @@ -101,5 +101,5 @@ TEST(GrpcRetryTest, GrpcRetryFailureTest) {
// the variable is not used in any way except keeping the server alive
int port;
auto server = makeServer(kAttemptsForFailure, port);
makeRequestAndCheckStatus(port, grpc::StatusCode::UNAVAILABLE, kErrorMessage);
makeRequestAndCheckStatus(port, grpc::StatusCode::ABORTED, kErrorMessage);
}

0 comments on commit 82ed36b

Please sign in to comment.