Skip to content

Cleanup dead branch and duplication in ThreadContext#89614

Merged
original-brownbear merged 1 commit intoelastic:mainfrom
original-brownbear:simplify-thread-context-tl
Aug 25, 2022
Merged

Cleanup dead branch and duplication in ThreadContext#89614
original-brownbear merged 1 commit intoelastic:mainfrom
original-brownbear:simplify-thread-context-tl

Conversation

@original-brownbear
Copy link
Copy Markdown
Contributor

The context stashing keeps showing up in profiling on the network thread. It's not a big deal but easy to simplify and speed up a little:

We never create a stored context that has transient headers to clear while at the same
time preserves response headers. Not supporting this path allows for splitting up
the logic into 3 distinct methods that are much easier to follow logically.

Also, this commit removes a few redundant threadlocal.get and set calls.

We never create a stored context that has transient headers to clear while at the same
time preserves response headers. Not supporting this path allows for splitting up
the logic into 3 distinct methods that are much easier to follow logically.

Also, this commit removes a few redundant threadlocal.get and set calls.
@original-brownbear original-brownbear added >non-issue :Core/Infra/Core Core issues without another label v8.5.0 labels Aug 25, 2022
@elasticsearchmachine elasticsearchmachine added the Team:Core/Infra Meta label for core/infra team label Aug 25, 2022
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

Copy link
Copy Markdown
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

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

LGTM!

@original-brownbear
Copy link
Copy Markdown
Contributor Author

Thanks Nikola!

@original-brownbear original-brownbear merged commit 6616746 into elastic:main Aug 25, 2022
@original-brownbear original-brownbear deleted the simplify-thread-context-tl branch August 25, 2022 15:43
@original-brownbear original-brownbear restored the simplify-thread-context-tl branch April 18, 2023 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Core Core issues without another label >non-issue Team:Core/Infra Meta label for core/infra team v8.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants