Skip to content

Use clean thread context for transport and applier service#57792

Merged
ywelsch merged 4 commits intoelastic:masterfrom
ywelsch:clean-thread-context
Jun 9, 2020
Merged

Use clean thread context for transport and applier service#57792
ywelsch merged 4 commits intoelastic:masterfrom
ywelsch:clean-thread-context

Conversation

@ywelsch
Copy link
Copy Markdown
Contributor

@ywelsch ywelsch commented Jun 8, 2020

Adds assertions to Netty to make sure that its threads are not polluted by thread contexts (and also that thread contexts are not leaked). Moves the ClusterApplierService to use the system context (same as we do for MasterService), which allows to remove a hack from TemplateUgradeService and makes it clearer that applying CS updates is fully executing under system context.

@ywelsch ywelsch marked this pull request as ready for review June 8, 2020 11:09
@ywelsch ywelsch added :Distributed/Network Http and internode communication implementations >non-issue v7.9.0 v8.0.0 labels Jun 8, 2020
@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-distributed (:Distributed/Network)

@elasticmachine elasticmachine added the Team:Distributed Meta label for distributed team. label Jun 8, 2020
Copy link
Copy Markdown
Contributor

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

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

Looks much nicer now thanks, just one question on the network side of things.

Copy link
Copy Markdown
Contributor

@original-brownbear original-brownbear left a comment

Choose a reason for hiding this comment

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

LGTM

@ywelsch ywelsch merged commit 5221970 into elastic:master Jun 9, 2020
ywelsch added a commit that referenced this pull request Jun 9, 2020
Adds assertions to Netty to make sure that its threads are not polluted by thread contexts (and
also that thread contexts are not leaked). Moves the ClusterApplierService to use the system
context (same as we do for MasterService), which allows to remove a hack from
TemplateUgradeService and makes it clearer that applying CS updates is fully executing under
system context.
ywelsch added a commit that referenced this pull request Jun 9, 2020
Only assert that actual request headers are empty, as default headers might still be there when stashing the context.
ywelsch added a commit that referenced this pull request Jun 9, 2020
Only assert that actual request headers are empty, as default headers might still be there when stashing the context.
ywelsch added a commit that referenced this pull request Jun 9, 2020
ywelsch added a commit that referenced this pull request Jun 9, 2020
ywelsch added a commit to ywelsch/elasticsearch that referenced this pull request Jun 10, 2020
…7792)

Adds assertions to Netty to make sure that its threads are not polluted by thread contexts (and
also that thread contexts are not leaked). Moves the ClusterApplierService to use the system
context (same as we do for MasterService), which allows to remove a hack from
TemplateUgradeService and makes it clearer that applying CS updates is fully executing under
system context.
ywelsch added a commit to ywelsch/elasticsearch that referenced this pull request Jun 10, 2020
Only assert that actual request headers are empty, as default headers might still be there when stashing the context.
ywelsch added a commit that referenced this pull request Jun 10, 2020
…57914)

Adds assertions to Netty to make sure that its threads are not polluted by thread contexts (and
also that thread contexts are not leaked). Moves the ClusterApplierService to use the system
context (same as we do for MasterService), which allows to remove a hack from
TemplateUgradeService and makes it clearer that applying CS updates is fully executing under
system context.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Distributed/Network Http and internode communication implementations >non-issue Team:Distributed Meta label for distributed team. v7.9.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants