Skip to content

CLEANUP+JAVAFICATION+PERFORMANCE: Keep hard reference to Ruby ThreadContext, simplify code accordingly#9401

Closed
original-brownbear wants to merge 1 commit intoelastic:masterfrom
original-brownbear:smarter-ruby-context-handling
Closed

CLEANUP+JAVAFICATION+PERFORMANCE: Keep hard reference to Ruby ThreadContext, simplify code accordingly#9401
original-brownbear wants to merge 1 commit intoelastic:masterfrom
original-brownbear:smarter-ruby-context-handling

Conversation

@original-brownbear
Copy link
Copy Markdown
Contributor

I realized we can keep Ruby's thread context strongly referenced in workers since those threads are always hot and have a clearly defined lifecycle.

  • This allows for a massive simplification for the invocation of filters and outputs from the Java execution
    • Also makes the filters and outputs look the same way the new Java API will look functionally :)
    • Allows for the removal of a lot of optimizations around getting a hold of the thread context in the generated Java execution code!

PS: I know that some of the remaining syntax generation code may be a little redundant now as well. Will keep cleaning this up further in subsequent PRs. This one is large enough already IMO :)

@original-brownbear original-brownbear force-pushed the smarter-ruby-context-handling branch from ea08393 to c1a5486 Compare April 18, 2018 12:13
Copy link
Copy Markdown
Contributor

@danhermann danhermann 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

@danhermann thanks!

@elasticsearch-bot
Copy link
Copy Markdown

Armin Braun merged this into the following branches!

Branch Commits
master 57e7a8a
6.x dc2c102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants