Skip to content

Remove unnecessary SPI reload calls #77680

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

Merged
merged 1 commit into from
Sep 14, 2021

Conversation

romseygeek
Copy link
Contributor

The PluginsService calls various lucene SPI reload methods to ensure that lookups
done via eg Codec.forName() will find classes that have been added via a plugin.
We also call SPI reloads for analysis components (CharFilters, Tokenizers and
TokenFilters). However, this is unnecessary, because elasticsearch uses its own
factory abstractions for these components and never uses lucene SPI to load them.

This commit removes the unnecessary SPI calls.

@romseygeek romseygeek added :Search Relevance/Analysis How text is split into tokens :Core/Infra/Plugins Plugin API and infrastructure >refactoring v8.0.0 v7.16.0 labels Sep 14, 2021
@romseygeek romseygeek requested a review from rjernst September 14, 2021 08:43
@romseygeek romseygeek self-assigned this Sep 14, 2021
@elasticmachine elasticmachine added Team:Search Meta label for search team Team:Core/Infra Meta label for core/infra team labels Sep 14, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@elasticmachine
Copy link
Collaborator

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

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

@romseygeek romseygeek merged commit b79f71c into elastic:master Sep 14, 2021
@romseygeek romseygeek deleted the analysis/reload-spi branch September 14, 2021 12:35
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
7.x Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 77680

romseygeek added a commit that referenced this pull request Sep 14, 2021
The PluginsService calls various lucene SPI reload methods to ensure that lookups
done via eg Codec.forName() will find classes that have been added via a plugin.
We also call SPI reloads for analysis components (CharFilters, Tokenizers and
TokenFilters). However, this is unnecessary, because elasticsearch uses its own
factory abstractions for these components and never uses lucene SPI to load them.

This commit removes the unnecessary SPI calls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Plugins Plugin API and infrastructure >refactoring :Search Relevance/Analysis How text is split into tokens Team:Core/Infra Meta label for core/infra team Team:Search Meta label for search team v7.16.0 v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants