Skip to content

Commit

Permalink
[BEAM-13015] Disable retries for fnapi grpc channels which otherwise …
Browse files Browse the repository at this point in the history
…defaults on. (apache#17243)

* [BEAM-13015] Disable retries for grpc channels which otherwise default to true.

Since the channel is to the local runner process, retries are not expected to
help. This simplifies the grpc stream stack to not involve a RetryStream object.

* fixup comment

* Update sdks/java/fn-execution/src/main/java/org/apache/beam/sdk/fn/channel/ManagedChannelFactory.java

* Update sdks/java/fn-execution/src/main/java/org/apache/beam/sdk/fn/channel/ManagedChannelFactory.java

Co-authored-by: Lukasz Cwik <lcwik@google.com>
  • Loading branch information
2 people authored and ryanthompson591 committed Apr 7, 2022
1 parent 9fc7100 commit 4e39a79
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ public ManagedChannel forDescriptor(ApiServiceDescriptor apiServiceDescriptor) {
// Set the message size to max value here. The actual size is governed by the
// buffer size in the layers above.
.maxInboundMessageSize(Integer.MAX_VALUE)
// Disable automatic retries as it introduces complexity and we send long-lived
// rpcs which will exceed the per-rpc retry request buffer and not be retried
// anyway. See
// https://github.com/grpc/proposal/blob/master/A6-client-retries.md#when-retries-are-valid
.disableRetry()
.intercept(interceptors);
if (directExecutor) {
channelBuilder = channelBuilder.directExecutor();
Expand Down

0 comments on commit 4e39a79

Please sign in to comment.