core: Disable retry by default for in-process transport's channel (#9361)

See #8712
This commit is contained in:
Larry Safran 2022-07-19 12:35:52 -07:00 committed by GitHub
parent 4aa9b92551
commit 7568f8cce7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -114,6 +114,10 @@ public final class InProcessChannelBuilder extends
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
@ -123,7 +127,7 @@ public final class InProcessChannelBuilder extends
}
@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);
}