Skip to content

Degrade connections after a timeout (3.14.x branch)#5680

Merged
swankjesse merged 1 commit intookhttp_3.14.xfrom
jwilson.0101.degrade
Jan 3, 2020
Merged

Degrade connections after a timeout (3.14.x branch)#5680
swankjesse merged 1 commit intookhttp_3.14.xfrom
jwilson.0101.degrade

Conversation

@swankjesse
Copy link
Copy Markdown
Collaborator

This is a manual cherry-pick of 09da07c

See also the degraded connections proposal.
#3146 (comment)

// If this is a brand new connection, we can skip the extensive health checks.
synchronized (connectionPool) {
if (candidate.successCount == 0) {
if (candidate.successCount == 0 && !candidate.isMultiplexed()) {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the biggest difference with the 4.x change. This condition wasn’t necessary there because we increment successCount on a timed out HTTP/2 request. (possibly mistakenly!)

This is a manual cherry-pick of 09da07c

See also the degraded connections proposal.
#3146 (comment)
@swankjesse swankjesse force-pushed the jwilson.0101.degrade branch from 1b7102b to 6a9a64c Compare January 2, 2020 04:14
@swankjesse
Copy link
Copy Markdown
Collaborator Author


[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for OkHttp (Parent) 3.14.5-SNAPSHOT:
[INFO]
[INFO] OkHttp (Parent) .................................... SUCCESS [  3.026 s]
[INFO] OkHttp ............................................. SUCCESS [  8.417 s]
[INFO] OkHttp test support classes ........................ SUCCESS [  2.598 s]
[INFO] OkHttp Transport Layer Security (TLS) .............. SUCCESS [  6.723 s]
[INFO] MockWebServer ...................................... SUCCESS [ 16.013 s]
[INFO] OkHttp URLConnection ............................... SUCCESS [  1.332 s]
[INFO] OkHttp Logging Interceptor ......................... SUCCESS [  3.805 s]
[INFO] OkHttp Tests ....................................... SUCCESS [02:33 min]
[INFO] OkHttp Server-Sent Events .......................... SUCCESS [  3.774 s]
[INFO] OkHttp DNS over HTTPS .............................. SUCCESS [  3.009 s]
[INFO] OkCurl ............................................. SUCCESS [  4.523 s]
[INFO] Samples (Parent) ................................... SUCCESS [  1.050 s]
[INFO] Sample: Guide ...................................... SUCCESS [  2.169 s]
[INFO] Sample: Crawler .................................... SUCCESS [  1.310 s]
[INFO] Sample: Simple Client .............................. SUCCESS [  1.266 s]
[INFO] Sample: Slack ...................................... SUCCESS [  1.407 s]
[INFO] Sample: Static Server .............................. SUCCESS [  1.726 s]
[INFO] Sample: UNIX domain sockets ........................ SUCCESS [  1.743 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  03:37 min
[INFO] Finished at: 2020-01-01T23:13:35-05:00
[INFO] ------------------------------------------------------------------------

@yschimke
Copy link
Copy Markdown
Collaborator

yschimke commented Jan 2, 2020

Copy link
Copy Markdown
Collaborator

@yschimke yschimke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed in comparison to the 4.x change, not overall.

@swankjesse swankjesse merged commit 57f2186 into okhttp_3.14.x Jan 3, 2020
@swankjesse swankjesse deleted the jwilson.0101.degrade branch January 3, 2020 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants