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

[FEATURE] Support for wait_for_completion flag in force merge API #152

Closed
navneet1v opened this issue Sep 25, 2023 · 9 comments
Closed

[FEATURE] Support for wait_for_completion flag in force merge API #152

navneet1v opened this issue Sep 25, 2023 · 9 comments
Labels
enhancement New feature or request missing api Missing API or api parameter that needs to be added.

Comments

@navneet1v
Copy link

Is your feature request related to a problem?

Currently the force merge api in the client waits for force_merge to get completed. But OpenSearch provides a way where if we pass wait_for_completion = true, it gives a task id and poll the task id to see if the force merge is completed or not.

What solution would you like?

Add the support for wait_for_completion flag in force merge api.

POST /hotels-index/_forcemerge?max_num_segments=1&wait_for_completion=true

What alternatives have you considered?

The only other way is to send Raw HTTP request, but the domain is backed with security creating raw HTTP request is very difficult and not feasible.

Do you have any additional context?

NA

@navneet1v navneet1v added enhancement New feature or request untriaged labels Sep 25, 2023
@dblock
Copy link
Member

dblock commented Sep 26, 2023

@saimedhi What's the right way to bring this in with the new generated code?

@saimedhi
Copy link
Contributor

saimedhi commented Sep 26, 2023

@dblock To add 'wait_for_completion' parameter to the 'forcemerge' API in Python, one approach is through the Python Generator. For a more comprehensive solution, it's best to integrate this parameter into the OpenSearch OpenAPI spec, making it accessible across all language client libraries.

@dblock
Copy link
Member

dblock commented Sep 26, 2023

@saimedhi yes exactly, is there a walkthrough / dev guide of what to add where?

@nhtruong
Copy link
Collaborator

@saimedhi
Copy link
Contributor

@dblock, @nhtruong please transfer this issue to opensearch-api-specification. I don't have access to do it.

@navneet1v
Copy link
Author

@saimedhi once this issue is moved there how long it will take for the attribute to be available in python client?

@saimedhi
Copy link
Contributor

Hello @navneet1v,

  • Once a PR is merged into the spec, we can generate and update the Python client whenever needed.
  • If we directly add changes to the Python client, they may get overwritten when the generator runs. So, it's best to make the initial change in the spec.

If you're familiar with Smithy, consider contributing. This way, we can ensure our PR gets merged quickly.

@dblock dblock transferred this issue from opensearch-project/opensearch-py Sep 28, 2023
@dblock dblock added missing api Missing API or api parameter that needs to be added. and removed untriaged labels Dec 20, 2023
@VachaShah
Copy link
Collaborator

The parameter has been added in the spec via PR #180. @saimedhi The python client can be regenerated to incorporate the changes.

@VachaShah
Copy link
Collaborator

Updated OpenAPI specs in #181

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request missing api Missing API or api parameter that needs to be added.
Projects
None yet
Development

No branches or pull requests

5 participants