Do not retry client requests when failing with ContentTooLargeException #87248
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
The default configuration of the Low Level Rest Client is to buffer the response body up to 100 MB. If that threshold is exceeded, a
ContentTooLargeExceptionis thrown in the lower layers of LLRC.When such an exception occurs, LLRC will retry the request, which has some bad side effects:
This PR fixes that, by ensuring that no retry happens if a request fails with a
ContentTooLargeException.Fixes #86041.
I added the
v6.8.24label to backport to 6.8 as this was found by a customer still using 6.8 and even if there's no additional 6.8 release, they may want to use a snapshot version with the fix.