Skip to content

Commit

Permalink
core: Disable retry by default for in-process transport's channel (gr…
Browse files Browse the repository at this point in the history
  • Loading branch information
larry-safran authored and temawi committed Jul 22, 2022
1 parent dd2fa0d commit f1282c0
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -114,6 +114,10 @@ public ClientTransportFactory buildClientTransportFactory() {
managedChannelImplBuilder.setStatsRecordStartedRpcs(false);
managedChannelImplBuilder.setStatsRecordFinishedRpcs(false);
managedChannelImplBuilder.setStatsRecordRetryMetrics(false);

// By default, In-process transport should not be retriable as that leaks memory. Since
// there is no wire, bytes aren't calculated so buffer limit isn't respected
managedChannelImplBuilder.disableRetry();
}

@Internal
Expand All @@ -123,7 +127,7 @@ protected ManagedChannelBuilder<?> delegate() {
}

@Override
public final InProcessChannelBuilder maxInboundMessageSize(int max) {
public InProcessChannelBuilder maxInboundMessageSize(int max) {
// TODO(carl-mastrangelo): maybe throw an exception since this not enforced?
return super.maxInboundMessageSize(max);
}
Expand Down

0 comments on commit f1282c0

Please sign in to comment.