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

[Enhancement] Change CatIndexTool implementation from _cat/index action to _list/index action #3182

Open
zane-neo opened this issue Oct 29, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@zane-neo
Copy link
Collaborator

Is your feature request related to a problem?

As _cat/index API is not performant in titan cluster and a new paginated _list/index API has been introduced recently: opensearch-project/OpenSearch#14258. We need to review the implementation of CatIndexTool as it uses the old RestIndicesAction which could cause issue on titan clusters. In this PR a new cluster setting cat.indices.response.limit.number_of_indices is introduced to control the maximum indices number in _cat/index API, so CatIndexTool could throw exception in a titan cluster w/o modifying the implementation.

What solution would you like?
Replace the CatIndexTool implementation to _list/index approach.

What alternatives have you considered?
Still use _cat/index API and honer the cluster setting cat.indices.response.limit.number_of_indices to make sure no exception thrown during runtime, but the drawback is the tool may not able to fetch all the indices in a titan cluster since the amount of the indices might more than the setting's value.

Do you have any additional context?
Add any other context or screenshots about the feature request here.

@dhrubo-os
Copy link
Collaborator

What do you mean by titan cluster?

@ylwu-amzn
Copy link
Collaborator

ylwu-amzn commented Dec 3, 2024

Why not build another ListIndexTool?
List index API introduced in 2.18 https://opensearch.org/docs/latest/api-reference/list/list-indices/. Seems hard to backport fix/enhance of CatIndexTool to older versions by changing it to _list/indices ,

@zane-neo
Copy link
Collaborator Author

zane-neo commented Dec 5, 2024

What do you mean by titan cluster?

Titan cluster means clusters that has a lot of number of nodes and on those clusters a _cat/index invocation might never return.

@zane-neo
Copy link
Collaborator Author

zane-neo commented Dec 5, 2024

Why not build another ListIndexTool? List index API introduced in 2.18 https://opensearch.org/docs/latest/api-reference/list/list-indices/. Seems hard to backport fix/enhance of CatIndexTool to older versions by changing it to _list/indices ,

Agreed, I'll add a new tool instead of modifying the CatIndexTool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

No branches or pull requests

4 participants