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

Fix TransportFieldCapabilitiesAction Blocking Transport Thread #75022

Conversation

original-brownbear
Copy link
Member

Running a request per index could take a very long time here if the request covers
a larger number of shards (especially when security is enabled).
Forking it to the management pool saves the transport thread from getting blocked.
Also, to make this request run quicker (again especially with security enabled)
I removed the redundant index-level request fan-out here as well to save one step
of redundant request handling and authorization (the shard level request is authorized
separately again anyway). In a follow-up to 8.x because of 7.x BwC issues, we can
refactor away the redundant index-level fan out as well.

Running a request per index could take a very long time here if the request covers
a larger number of shards (especially when security is enabled).
Forking it to the management pool saves the transport thread from getting blocked.
Also, to make this request run quicker (again esepecially with security enabled)
I removed the redundant index-level request fan-out here as well to save one step
of redundant request handling and authorization (the shard level request is authorized
separately again anyway). In a follow-up to 8.x because of 7.x BwC issues, we can
refactor away the redundant  index-level fan out as well.
@original-brownbear original-brownbear added >non-issue :Data Management/Indices APIs APIs to create and manage indices and templates v8.0.0 v7.15.0 labels Jul 7, 2021
@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Jul 7, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (Team:Core/Features)

@original-brownbear
Copy link
Member Author

@elasticmachine update branch

Copy link
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

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

LGTM, nice simplification.

@original-brownbear
Copy link
Member Author

Thanks Jim!

@original-brownbear original-brownbear merged commit 49a57ee into elastic:master Jul 7, 2021
@original-brownbear original-brownbear deleted the fork-field-capabilities-action branch July 7, 2021 15:01
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Jul 7, 2021
…ic#75022)

Running a request per index could take a very long time here if the request covers
a larger number of shards (especially when security is enabled).
Forking it to the management pool saves the transport thread from getting blocked.
Also, to make this request run quicker (again especially with security enabled)
I removed the redundant index-level request fan-out here as well to save one step
of redundant request handling and authorization (the shard level request is authorized
separately again anyway). In a follow-up to 8.x because of 7.x BwC issues, we can
refactor away the redundant  index-level fan out as well.
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Jul 7, 2021
We have a number of failures in these tests due to elastic#75022
which makes the field caps transport action fork to the management pool.
-> we have to always fork in this test now to not block the management pool.
original-brownbear added a commit that referenced this pull request Jul 7, 2021
We have a number of failures in these tests due to #75022
which makes the field caps transport action fork to the management pool.
-> we have to always fork in this test now to not block the management pool.
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Jul 8, 2021
We have a number of failures in these tests due to elastic#75022
which makes the field caps transport action fork to the management pool.
-> we have to always fork in this test now to not block the management pool.
original-brownbear added a commit that referenced this pull request Jul 8, 2021
… (#75081)

Running a request per index could take a very long time here if the request covers
a larger number of shards (especially when security is enabled).
Forking it to the management pool saves the transport thread from getting blocked.
Also, to make this request run quicker (again especially with security enabled)
I removed the redundant index-level request fan-out here as well to save one step
of redundant request handling and authorization (the shard level request is authorized
separately again anyway). In a follow-up to 8.x because of 7.x BwC issues, we can
refactor away the redundant  index-level fan out as well.
original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Jul 8, 2021
Follow up to elastic#75022 removing now outdated BwC code from `8.x` + some additional related dead BwC removal.
In `7.x` we can't drop the index-level transport action I think because of technical
BwC with the transport client so this is just an 8.x PR.
original-brownbear added a commit that referenced this pull request Jul 8, 2021
Follow up to #75022 removing now outdated BwC code from `8.x` + some additional related dead BwC removal.
In `7.x` we can't drop the index-level transport action I think because of technical
BwC with the transport client so this is just an 8.x PR.
@jtibshirani jtibshirani added the :Search Foundations/Mapping Index mappings, including merging and defining field types label Aug 11, 2021
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Aug 11, 2021
@elasticmachine
Copy link
Collaborator

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

original-brownbear added a commit to original-brownbear/elasticsearch that referenced this pull request Aug 11, 2021
…ic#75022) (elastic#75081)

Running a request per index could take a very long time here if the request covers
a larger number of shards (especially when security is enabled).
Forking it to the management pool saves the transport thread from getting blocked.
Also, to make this request run quicker (again especially with security enabled)
I removed the redundant index-level request fan-out here as well to save one step
of redundant request handling and authorization (the shard level request is authorized
separately again anyway). In a follow-up to 8.x because of 7.x BwC issues, we can
refactor away the redundant  index-level fan out as well.
@mattkime
Copy link

Any thoughts on how much this will help slow field_caps responses?

original-brownbear added a commit that referenced this pull request Aug 12, 2021
… (#75081) (#76388)

Running a request per index could take a very long time here if the request covers
a larger number of shards (especially when security is enabled).
Forking it to the management pool saves the transport thread from getting blocked.
Also, to make this request run quicker (again especially with security enabled)
I removed the redundant index-level request fan-out here as well to save one step
of redundant request handling and authorization (the shard level request is authorized
separately again anyway). In a follow-up to 8.x because of 7.x BwC issues, we can
refactor away the redundant  index-level fan out as well.
@original-brownbear
Copy link
Member Author

@mattkime this won't be an order-of-magnitude improvement. I think best case this is a ~2x speedup and the real world will probably see less than 2x due to other noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Data Management/Indices APIs APIs to create and manage indices and templates :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Data Management Meta label for data/management team Team:Search Meta label for search team v7.14.1 v7.15.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants