Skip to content

Commit

Permalink
core: Disable retry by default for in-process transport's channel (#9368
Browse files Browse the repository at this point in the history
)

Backport of PR #9361 
See issue #8712
  • Loading branch information
larry-safran authored Jul 21, 2022
1 parent 84f6086 commit 61a3a2f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
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 61a3a2f

Please sign in to comment.