Skip to content
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

ListenableFuture should preserve ThreadContext #34394

Merged
merged 3 commits into from
Oct 11, 2018

Conversation

jaymode
Copy link
Member

@jaymode jaymode commented Oct 11, 2018

ListenableFuture may run a listener on the same thread that called the
addListener method or it may execute on another thread after the future
has completed. Whenever the ListenableFuture stores the listener for
execution later, it should preserve the thread context which is what
this change does.

ListenableFuture may run a listener on the same thread that called the
addListener method or it may execute on another thread after the future
has completed. Whenever the ListenableFuture stores the listener for
execution later, it should preserve the thread context which is what
this change does.
@jaymode jaymode added >bug v7.0.0 :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) v6.5.0 v6.4.3 labels Oct 11, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security

Copy link
Contributor

@tvernum tvernum left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Member

@jkakavas jkakavas left a comment

Choose a reason for hiding this comment

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

LGTM

@jaymode jaymode merged commit 6d99d7d into elastic:master Oct 11, 2018
@jaymode jaymode deleted the listenable_future_context branch October 11, 2018 14:24
jaymode added a commit that referenced this pull request Oct 11, 2018
ListenableFuture may run a listener on the same thread that called the
addListener method or it may execute on another thread after the future
has completed. Whenever the ListenableFuture stores the listener for
execution later, it should preserve the thread context which is what
this change does.
jaymode added a commit that referenced this pull request Oct 11, 2018
ListenableFuture may run a listener on the same thread that called the
addListener method or it may execute on another thread after the future
has completed. Whenever the ListenableFuture stores the listener for
execution later, it should preserve the thread context which is what
this change does.
jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Oct 15, 2018
* elastic/master:
  Mute PartitionedRoutingIT#testShrinking on Windows
  Mute testToQuery test
  [TEST] Make sure there are shards started so that `ESIntegTestCase#assertSameDocIdsOnShards()` does not fail with shard not found.
  Change shard changes api's threadpool from get to search (elastic#34421)
  Update TESTING.asciidoc title (elastic#34401)
  Tests: Fix DateFormatter equals tests with locale (elastic#34435)
  Docs: Remove unnecessary qualifier from wildcard import note (elastic#34419)
  CCR/TEST: AwaitsFix testFailOverOnFollower
  [Painless] Add a Map for java names to classes for use in the custom classloader (elastic#34424)
  TEST: Fix indentation in FullClusterRestartIT (elastic#34420)
  [WIP] Ingest Attachement: Upgrade tika to v1.19.1 (elastic#33896)
  NETWORKING: Upgrade Netty to 4.1.30 (elastic#34417)
  Allow an AuthenticationResult to return metadata (elastic#34382)
  [ML] Add an ingest pipeline definition to structure finder (elastic#34350)
  Handle pre-6.x time fields (elastic#34373)
  ListenableFuture should preserve ThreadContext (elastic#34394)
kcm pushed a commit that referenced this pull request Oct 30, 2018
ListenableFuture may run a listener on the same thread that called the
addListener method or it may execute on another thread after the future
has completed. Whenever the ListenableFuture stores the listener for
execution later, it should preserve the thread context which is what
this change does.
@jimczi jimczi added v7.0.0-beta1 and removed v7.0.0 labels Feb 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) v6.4.3 v6.5.0 v7.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants