[Monitoring] Make Exporters Async#35765
Merged
pickypg merged 8 commits intoelastic:masterfrom Nov 27, 2018
Merged
Conversation
Collaborator
|
Pinging @elastic/es-core-features |
Member
Author
|
Note: I haven't updated any of the tests yet. I wanted to validate my approach as the amount of code changed was larger than I had initially expected. I'm fairly sure that the direction is the intended one, but before I go down the path of changing all of the tests, I've got it working here async this way. |
Member
Author
|
/cc @elastic/kibana-monitoring |
martijnvg
reviewed
Nov 21, 2018
...k/plugin/monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/Exporters.java
Outdated
Show resolved
Hide resolved
...ring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/VersionHttpResource.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/PublishableHttpResource.java
Outdated
Show resolved
Hide resolved
.../monitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/HttpResource.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/PublishableHttpResource.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/PublishableHttpResource.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/elasticsearch/xpack/monitoring/exporter/http/PublishableHttpResource.java
Outdated
Show resolved
Hide resolved
...onitoring/src/main/java/org/elasticsearch/xpack/monitoring/exporter/local/LocalExporter.java
Outdated
Show resolved
Hide resolved
ed7dc58 to
32305dd
Compare
Member
Author
|
@martijnvg This one is ready for a full review now that the tests have been updated. |
martijnvg
approved these changes
Nov 27, 2018
Member
martijnvg
left a comment
There was a problem hiding this comment.
Left one small comment - LGTM.
.../src/test/java/org/elasticsearch/xpack/monitoring/exporter/http/AsyncHttpResourceHelper.java
Outdated
Show resolved
Hide resolved
This changes the exporter code -- most notably the `http` exporter -- to use async operations throughout the resource management and bulk initialization code (the bulk indexing of monitoring documents was already async). As part of this change, this does change one semi-core aspect of the `HttpResource` class in that it will no longer block all concurrent calls until the first call completes with `HttpResource#checkAndPublishIfDirty`. Now, the any incoming attempts to check the resources will be skipped until the first call completes (success or failure). While this is a technical change, it has very little practical impact because the existing behavior was either success, then every processed quickly or each request timed out and failed anyway, thus being effectively skipped.
581963c to
de60734
Compare
Member
Author
|
Rebased for cluster upgrade test failure. |
pickypg
added a commit
that referenced
this pull request
Nov 27, 2018
This changes the exporter code -- most notably the `http` exporter -- to use async operations throughout the resource management and bulk initialization code (the bulk indexing of monitoring documents was already async). As part of this change, this does change one semi-core aspect of the `HttpResource` class in that it will no longer block all concurrent calls until the first call completes with `HttpResource::checkAndPublishIfDirty`. Now, any parallel attempts to check the resources will be skipped until the first call completes (success or failure). While this is a technical change, it has very little practical impact because the existing behavior was either quick success (then every blocked request processed) or each request timed out and failed anyway, thus being effectively skipped (and a burden on the system).
Member
Author
|
6.x/6.6: 9ffc492 |
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
Nov 28, 2018
* master: DOCS Audit event attributes in new format (elastic#35510) Scripting: Actually add joda time back to whitelist (elastic#35965) [DOCS] fix HLRC ILM doc misreferenced tag Add realm information for Authenticate API (elastic#35648) [ILM] add HLRC docs to remove-policy-from-index (elastic#35759) [Rollup] Update serialization version after backport [Rollup] Add more diagnostic stats to job (elastic#35471) Build: Fix gradle build for Mac OS (elastic#35968) Adds deprecation logging to ScriptDocValues#getValues. (elastic#34279) [Monitoring] Make Exporters Async (elastic#35765) [ILM] reduce time restriction on IndexLifecycleExplainResponse (elastic#35954) Remove use of AbstractComponent in xpack (elastic#35394) Deprecate types in search and multi search templates. (elastic#35669) Remove fromXContent from IndexUpgradeInfoResponse (elastic#35934)
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.
This changes the exporter code -- most notably the
httpexporter -- to use async operations throughout the resource management and bulk initialization code (the bulk indexing of monitoring documents was already async).As part of this change, this does change one semi-core aspect of the
HttpResourceclass in that it will no longer block all concurrent calls until the first call completes withHttpResource::checkAndPublishIfDirty. Now, any parallel attempts to check the resources will be skipped until the first call completes (success or failure). While this is a technical change, it has very little practical impact because the existing behavior was either quick success (then every blocked request processed) or each request timed out and failed anyway, thus being effectively skipped (and a burden on the system).Closes #35743