-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Make GET _cluster/stats cancellable #68676
Merged
DaveCTurner
merged 9 commits into
elastic:master
from
DaveCTurner:2021-02-08-cancellable-cluster-stats
Feb 10, 2021
Merged
Make GET _cluster/stats cancellable #68676
DaveCTurner
merged 9 commits into
elastic:master
from
DaveCTurner:2021-02-08-cancellable-cluster-stats
Feb 10, 2021
Conversation
This file contains 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
Today `GET _cluster/stats` can be quite expensive, and is typically retrieved periodically by monitoring systems (e.g. Metricbeat) that implement a client-side timeout. When the client times out it closes the HTTP connection in use. With this commit we react to the close of the HTTP connection by cancelling the ongoing stats request, avoiding unnecessary duplicated work. Relates elastic#55550
DaveCTurner
added
>enhancement
:Data Management/Stats
Statistics tracking and retrieval APIs
v8.0.0
v7.12.0
labels
Feb 8, 2021
Pinging @elastic/es-core-features (Team:Core/Features) |
DaveCTurner
commented
Feb 8, 2021
server/src/main/java/org/elasticsearch/action/support/PlainListenableActionFuture.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/support/nodes/TransportNodesAction.java
Show resolved
Hide resolved
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.
Thanks @DaveCTurner , this looks great.
.../src/main/java/org/elasticsearch/action/admin/cluster/stats/TransportClusterStatsAction.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/common/util/CancellableSingleObjectCache.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/support/PlainListenableActionFuture.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/support/nodes/TransportNodesAction.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/action/admin/cluster/stats/AnalysisStats.java
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/common/util/CancellableSingleObjectCacheTests.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/common/util/CancellableSingleObjectCacheTests.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/common/util/CancellableSingleObjectCache.java
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/common/util/CancellableSingleObjectCacheTests.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/elasticsearch/common/util/CancellableSingleObjectCacheTests.java
Outdated
Show resolved
Hide resolved
henningandersen
approved these changes
Feb 9, 2021
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.
LGTM.
DaveCTurner
added a commit
to DaveCTurner/elasticsearch
that referenced
this pull request
Feb 10, 2021
Today `GET _cluster/stats` can be quite expensive, and is typically retrieved periodically by monitoring systems (e.g. Metricbeat) that implement a client-side timeout. When the client times out it closes the HTTP connection in use. With this commit we react to the close of the HTTP connection by cancelling the ongoing stats request, avoiding unnecessary duplicated work. Relates elastic#55550
DaveCTurner
added a commit
that referenced
this pull request
Feb 10, 2021
Today `GET _cluster/stats` can be quite expensive, and is typically retrieved periodically by monitoring systems (e.g. Metricbeat) that implement a client-side timeout. When the client times out it closes the HTTP connection in use. With this commit we react to the close of the HTTP connection by cancelling the ongoing stats request, avoiding unnecessary duplicated work. Relates #55550 Backport of #68676
34 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
:Data Management/Stats
Statistics tracking and retrieval APIs
>enhancement
Team:Data Management
Meta label for data/management team
v7.12.0
v8.0.0-alpha1
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.
Today
GET _cluster/stats
can be quite expensive, and is typicallyretrieved periodically by monitoring systems (e.g. Metricbeat) that
implement a client-side timeout. When the client times out it closes the
HTTP connection in use. With this commit we react to the close of the
HTTP connection by cancelling the ongoing stats request, avoiding
unnecessary duplicated work.
Relates #55550