Repository navigation
Apply rest.client timeouts to the SigV4 adapter - #4099
Open
David-Banquet wants to merge 1 commit into
Open
David-Banquet wants to merge 1 commit into
David-Banquet wants to merge 1 commit into
Conversation
The SigV4 adapter is mounted on the catalog URI and wins over the timeout adapter, so rest.client.connection-timeout-ms and socket-timeout-ms were ignored with SigV4 (apache#4076).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #4076
Rationale for this change
rest.client.connection-timeout-msandrest.client.socket-timeout-msare ignored whenrest.sigv4-enabledis set.SigV4Adapteris mounted on the catalog URI, sorequestspicks it over the timeout adapter mounted onhttp://andhttps://, and it never sets a timeout.SigV4Adapternow extends_RetryTimeoutHTTPAdapterand gets the same timeout, computed by a small_connection_timeouthelper shared with_create_connection_adapter. Its retries still come fromrest.sigv4.max-retries.Are these changes tested?
Yes.
test_sigv4_adapter_applies_connection_timeoutchecks the adapter on the catalog URI carries the summed timeout and the SigV4 retry default. It fails without the change.With the repro from the issue (server answering after 8 s, 1 s + 1 s timeout):
The 22 s are 11 attempts of 2 s:
SigV4Adapterretries 10 times by default with no backoff. That is the retry behavior tracked in #3008, left unchanged here.Are there any user-facing changes?
Yes: the
rest.client.*timeouts now apply to SigV4 catalogs (S3 Tables, Glue REST). Those properties are not released yet (#3418), so no released behavior changes.#3120 replaces
SigV4Adapterwith a plainHTTPAdapter; if it lands first I'll rebase this onto it.