-
Notifications
You must be signed in to change notification settings - Fork 280
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
[2.x] Optimize privilege evaluation for index permissions across '*' index pattern (i.e. all_access role) #4926
[2.x] Optimize privilege evaluation for index permissions across '*' index pattern (i.e. all_access role) #4926
Conversation
Signed-off-by: Craig Perkins <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 2.x #4926 +/- ##
==========================================
- Coverage 63.91% 0 -63.92%
==========================================
Files 330 0 -330
Lines 23118 0 -23118
Branches 3745 0 -3745
==========================================
- Hits 14777 0 -14777
+ Misses 6509 0 -6509
+ Partials 1832 0 -1832 |
Signed-off-by: Craig Perkins <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution, can we add some tests?
Signed-off-by: Craig Perkins <[email protected]>
Added unit tests. |
Signed-off-by: Craig Perkins <[email protected]>
I setup OSB to test this change applied in a 2.18 cluster and pretty consistently saw an improvement when ingesting data with the
Example script to create test indices:
Results for 3 node cluster, with 1k indices:
On a separate runs, one result was close to 30s cumulative time for indexing and another 37.75s Similar gains were seen with different # of indices as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@cwperks can we create an issue to get this into main once the situation with OPE is resolved/backported? |
Description
Creating this backport to explore a small optimization for the all_access role when evaluating index permissions in clusters with a large number of indices.
This PR is not a strategic fix like #4898. #4898 takes a holistic approach to optimize privilege evaluation for any type of role definition.
Performance improvement
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.