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

[Extensions] Improves performance by replacing cluster state calls to retrieve index mappings, cluster index health #921

Merged

Conversation

joshpalis
Copy link
Member

Description

Companion SDK PR : opensearch-project/opensearch-sdk-java#810 (SDK PR must be merged first )

Replaces the following cluster state calls to retrieve index metadata mapping and to determine cluster index health with GetMappings / ClusterHealth requests using the SDKIndicesClient/SDKClusterAdminClient :

  • state().metadata().index(resultIndex)
  • state().metadata().index(indexOrAliasName)
  • state().getRoutingTable().index(indexOrAliasName)

Issues Resolved

Part of opensearch-project/opensearch-sdk-java#674

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.

…MetaData with GetMappingsRequest for the given index

Signed-off-by: Joshua Palis <jpalis@amazon.com>
…ter index health code with ClusterHealthRequest

Signed-off-by: Joshua Palis <jpalis@amazon.com>
Signed-off-by: Joshua Palis <jpalis@amazon.com>
@joshpalis joshpalis force-pushed the clusterstate branch 2 times, most recently from 2a9cd47 to 0b86202 Compare June 7, 2023 18:03
Signed-off-by: Joshua Palis <jpalis@amazon.com>
@codecov
Copy link

codecov bot commented Jun 7, 2023

Codecov Report

Merging #921 (c091935) into feature/extensions (56b038f) will decrease coverage by 0.09%.
The diff coverage is 10.52%.

Impacted file tree graph

@@                   Coverage Diff                    @@
##             feature/extensions     #921      +/-   ##
========================================================
- Coverage                 42.95%   42.86%   -0.09%     
+ Complexity                 2421     2420       -1     
========================================================
  Files                       301      301              
  Lines                     18139    18169      +30     
  Branches                   1872     1873       +1     
========================================================
- Hits                       7791     7788       -3     
- Misses                     9771     9806      +35     
+ Partials                    577      575       -2     
Flag Coverage Δ
plugin 42.86% <10.52%> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../main/java/org/opensearch/ad/NodeStateManager.java 56.12% <ø> (ø)
...rch/ad/transport/AnomalyResultTransportAction.java 0.00% <ø> (ø)
...c/main/java/org/opensearch/ad/util/IndexUtils.java 1.33% <0.00%> (-0.16%) ⬇️
...opensearch/ad/indices/AnomalyDetectionIndices.java 12.27% <14.81%> (-0.90%) ⬇️

... and 2 files with indirect coverage changes

@joshpalis joshpalis merged commit 45127f7 into opensearch-project:feature/extensions Jun 7, 2023
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants