-
Notifications
You must be signed in to change notification settings - Fork 844
SOLR-17433: Set default http request timeout to infinite #4626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
0a475cf
08359ce
bca4e41
739f3e9
206d1df
898166d
52bad08
e5c4d0b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| title: Changed default http request timeout to infinite | ||
| type: changed | ||
| authors: | ||
| - name: Vishnu Priya Chandra Sekar | ||
| links: | ||
| - name: SOLR-17433 | ||
| url: https://issues.apache.org/jira/browse/SOLR-17433 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,7 +28,11 @@ public HttpSolrClient solrClient(Integer overrideIdleTimeoutMs) { | |
| var builder = | ||
| new HttpJdkSolrClient.Builder().withSSLContext(MockTrustManager.ALL_TRUSTING_SSL_CONTEXT); | ||
| if (overrideIdleTimeoutMs != null) { | ||
| builder.withIdleTimeout(overrideIdleTimeoutMs, TimeUnit.MILLISECONDS); | ||
| builder | ||
| .withIdleTimeout(overrideIdleTimeoutMs, TimeUnit.MILLISECONDS) | ||
| // override the infinite request timeout with idle timeout to ensure idle requests times | ||
| // out. | ||
|
VishnuPriyaChandraSekar marked this conversation as resolved.
|
||
| .withRequestTimeout(overrideIdleTimeoutMs, TimeUnit.MILLISECONDS); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should probably just be 0, infinite? |
||
| } | ||
| return builder.build(); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -405,6 +405,9 @@ private class TimeoutZombieTestContext implements AutoCloseable { | |
| new HttpJettySolrClient.Builder() | ||
| .withConnectionTimeout(1000, TimeUnit.MILLISECONDS) | ||
| .withIdleTimeout(1, TimeUnit.MILLISECONDS) | ||
| // override the infinite request timeout with idle timeout to ensure idle requests | ||
| // times out. | ||
|
Comment on lines
+408
to
+409
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. something seems suspicious... the idle timeout should work if the request timeout is infinite. They are different things; idle refers to the longest period of not receiving any data at all from the server. The request timeout is an overall timeout for the entire request. |
||
| .withRequestTimeout(1, TimeUnit.MILLISECONDS) | ||
| .build(); | ||
|
|
||
| lbClient = new LBJettySolrClient.Builder(delegateClient, nonRoutableEndpoint).build(); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.