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

Refactor json parsing in immutable handlers #88492

Merged
merged 3 commits into from
Jul 13, 2022

Conversation

grcevski
Copy link
Contributor

The current immutable handlers assume json input, which is inefficient for use by plugins and modules. This PR refactors the xcontent parsing in a separate method to be used only when we actually have json input (file based settings).

This way the immutable state controller can work with POJOs and xcontent too.

This PR is split off from #88224 to reduce the PR size.

@grcevski grcevski added >non-issue :Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team v8.4.0 labels Jul 13, 2022
@elasticmachine
Copy link
Collaborator

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

@@ -284,18 +284,4 @@ static int capacity(int expectedSize) {
return expectedSize < 2 ? expectedSize + 1 : (int) (expectedSize / 0.75 + 1.0);
}

/**
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not needed anymore with the way I do parsing. This method was added previously by me.

@@ -0,0 +1,8 @@
#
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added this file because we need it to expose the service provider when we load them in the future using PluginsService createExtension.

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

LGTM

@grcevski grcevski merged commit 001fef1 into elastic:master Jul 13, 2022
@grcevski grcevski deleted the operator/split_json_parsin branch July 13, 2022 14:04
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.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants