Adds trace logging to IndicesRequestCache#34180
Merged
colings86 merged 2 commits intoelastic:masterfrom Oct 3, 2018
colings86:debug/requestCacheTestLogging
Merged
Adds trace logging to IndicesRequestCache#34180colings86 merged 2 commits intoelastic:masterfrom colings86:debug/requestCacheTestLogging
colings86 merged 2 commits intoelastic:masterfrom
colings86:debug/requestCacheTestLogging
Conversation
This change adds trace level logging to `IndicesrrequestCache` witht eh primary aim of helping to identify the cause of teh failures in #32827. The cache will log at trace level when a cache hit or miss occurs including the reader version and the cache key. Note that this change adds a `cacheKeyRenderer` whcih supplies a human readable String of the cache key since the actual cache key itself is a `BytesReference` containing the wire protocol serialised form of the request. Logging is also added for the case where a search timeout occurs and fr that reason the cache entry is invalidated.
Collaborator
|
Pinging @elastic/es-search-aggs |
jpountz
reviewed
Oct 1, 2018
|
|
||
| BytesReference getOrCompute(CacheEntity cacheEntity, Supplier<BytesReference> loader, | ||
| DirectoryReader reader, BytesReference cacheKey) throws Exception { | ||
| DirectoryReader reader, BytesReference cacheKey, Supplier<String> cacheKeyRenderer) throws Exception { |
Contributor
There was a problem hiding this comment.
This new parameter hurts a bit the API, can we avoid it somehow? Or at least leave a comment asking to remove it once #32827 is addressed?
Contributor
Author
There was a problem hiding this comment.
I agree that it hurts the API, unfortunately I didn't see a better way of exposing the request information in the log message since the cache key is the wire-protocol bytes of the request and converting the cache key back into a request object would have exposed things on the request that we wouldn't want either. Happy to add a comment as you suggest, also happy to implement a better way of supplying this information if someone can think of one
kcm
pushed a commit
that referenced
this pull request
Oct 30, 2018
* Adds trace logging to IndicesRequestCache This change adds trace level logging to `IndicesrrequestCache` witht eh primary aim of helping to identify the cause of teh failures in #32827. The cache will log at trace level when a cache hit or miss occurs including the reader version and the cache key. Note that this change adds a `cacheKeyRenderer` whcih supplies a human readable String of the cache key since the actual cache key itself is a `BytesReference` containing the wire protocol serialised form of the request. Logging is also added for the case where a search timeout occurs and fr that reason the cache entry is invalidated. * Adds comment to remaind us to remove cacheKeyRenderer
javanna
added a commit
to javanna/elasticsearch
that referenced
this pull request
Sep 17, 2020
In the context of of a recurring test failure tracked by elastic#32827, we added trace logging and an extra cache key renderer argument to IndicesRequestCache#getOrCompute (see elastic#39475 and elastic#34180). We addressed the issue with elastic#54071, but the extra argument was left behind, with a NORELEASE comment saying it should be removed. With this commit, we remove the extra cache key rendered argument and the corresponding log lines which are not so useful without it. Closes elastic#55837
javanna
added a commit
that referenced
this pull request
Sep 18, 2020
In the context of of a recurring test failure tracked by #32827, we added trace logging and an extra cache key renderer argument to IndicesRequestCache#getOrCompute (see #39475 and #34180). We addressed the issue with #54071, but the extra argument was left behind, with a NORELEASE comment saying it should be removed. With this commit, we remove the extra cache key rendered argument and the corresponding log lines which are not so useful without it. Closes #55837
javanna
added a commit
to javanna/elasticsearch
that referenced
this pull request
Sep 18, 2020
…62534) In the context of of a recurring test failure tracked by elastic#32827, we added trace logging and an extra cache key renderer argument to IndicesRequestCache#getOrCompute (see elastic#39475 and elastic#34180). We addressed the issue with elastic#54071, but the extra argument was left behind, with a NORELEASE comment saying it should be removed. With this commit, we remove the extra cache key rendered argument and the corresponding log lines which are not so useful without it. Closes elastic#55837
javanna
added a commit
that referenced
this pull request
Sep 18, 2020
In the context of of a recurring test failure tracked by #32827, we added trace logging and an extra cache key renderer argument to IndicesRequestCache#getOrCompute (see #39475 and #34180). We addressed the issue with #54071, but the extra argument was left behind, with a NORELEASE comment saying it should be removed. With this commit, we remove the extra cache key rendered argument and the corresponding log lines which are not so useful without it. Closes #55837
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 change adds trace level logging to
IndicesrrequestCachewith theprimary aim of helping to identify the cause of the failures in
#32827. The cache will
log at trace level when a cache hit or miss occurs including the reader
version and the cache key. Note that this change adds a
cacheKeyRendererwhich supplies a human readable String of the cachekey since the actual cache key itself is a
BytesReferencecontainingthe wire protocol serialised form of the request.
Logging is also added for the case where a search timeout occurs and fr
that reason the cache entry is invalidated.