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
Pass ThreadContext to transport interceptors to allow header modification #22618
Merged
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
…tion TransportInterceptors are commonly used to enrich requests with headers etc. which requires access the the thread context. This is not always easily possible since threadpools are hard to access for instance if the interceptor is used on a transport client. This commit passes on the thread context to all the interceptors for further consumption. Closes elastic#22585
s1monw
added
:Internal
:Core/Infra/Plugins
Plugin API and infrastructure
>enhancement
v5.2.0
v5.3.0
v6.0.0-alpha1
labels
Jan 13, 2017
rjernst
approved these changes
Jan 13, 2017
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
@@ -42,8 +43,12 @@ | |||
/** | |||
* Returns a list of {@link TransportInterceptor} instances that are used to intercept incoming and outgoing | |||
* transport (inter-node) requests. This must not return <code>null</code> | |||
* | |||
* @param namedWriteableRegistry registry of all named writeables registered | |||
* @param threadContext a {@link ThreadContext} of the current nodes or clients threadpool this can be used to set additional |
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.
Nit: this - > that
Gordiychuk
approved these changes
Jan 13, 2017
@elasticmachine test this please |
s1monw
added a commit
that referenced
this pull request
Jan 15, 2017
…tion (#22618) TransportInterceptors are commonly used to enrich requests with headers etc. which requires access the the thread context. This is not always easily possible since threadpools are hard to access for instance if the interceptor is used on a transport client. This commit passes on the thread context to all the interceptors for further consumption. Closes #22585
s1monw
added a commit
that referenced
this pull request
Jan 15, 2017
…tion (#22618) TransportInterceptors are commonly used to enrich requests with headers etc. which requires access the the thread context. This is not always easily possible since threadpools are hard to access for instance if the interceptor is used on a transport client. This commit passes on the thread context to all the interceptors for further consumption. Closes #22585
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
Jan 16, 2017
* master: Do not configure a logger named level Inclusion of link to Multi Delete (elastic#22619) Fix formatting in update-by-query (elastic#22628) [DOCS] Fiexes typo in getting started doc [DOCS]cMake it clear that bulk API actions are processed sequentially on each shard rather than sequentially overall (elastic#22550) Indexing: Add shard id to indexing operation listener (elastic#22606) Cleanup handling of cgroup stats Pass ThreadContext to transport interceptors to allow header modification (elastic#22618) Log deleting indices at info level
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
TransportInterceptors are commonly used to enrich requests with headers etc.
which requires access the the thread context. This is not always easily possible
since threadpools are hard to access for instance if the interceptor is used on a transport client.
This commit passes on the thread context to all the interceptors for further consumption.
Closes #22585