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

[BUG] _clone does not accept wait_for_completion=true in params #7419

Closed
VladutZzZ opened this issue May 4, 2023 · 6 comments
Closed

[BUG] _clone does not accept wait_for_completion=true in params #7419

VladutZzZ opened this issue May 4, 2023 · 6 comments
Labels
bug Something isn't working distributed framework

Comments

@VladutZzZ
Copy link

Hello,

In public documentation of _clone https://opensearch.org/docs/latest/api-reference/index-apis/clone/, wait_for_completion is presented as accepted parameter in URL. But when is used, an error is thrown:

{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "request [/template/_clone/index-2023.05.04] contains unrecognized parameter: [wait_for_completion]"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "request [/template/_clone/index-2023.05.04] contains unrecognized parameter: [wait_for_completion]"
  },
  "status" : 400
}

To Reproduce
Run next POST request:

POST /template/_clone/index-2023.05.04?wait_for_completion=true
{
  "settings": {
    "index.blocks.write": false
  }
}

Expected behavior

Index is cloned and request will wait to finish.

@VladutZzZ VladutZzZ added bug Something isn't working untriaged labels May 4, 2023
@anasalkouz
Copy link
Member

Maybe related PR: #6434

@danandreicarp
Copy link

Also happens for forcemerge:

POST /clone-daily-sa-2023-07-27/_forcemerge?wait_for_completion=false
{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "request [/clone-daily-sa-2023-07-27/_forcemerge] contains unrecognized parameter: [wait_for_completion]"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "request [/clone-daily-sa-2023-07-27/_forcemerge] contains unrecognized parameter: [wait_for_completion]"
  },
  "status": 400
}

@gaobinlong
Copy link
Collaborator

hi @VladutZzZ @danandreicarp, which OpenSearch version did you use? The parameter wait_for_completion for clone and forcemerge API was introduced in 2.7.0.

@danandreicarp
Copy link

I used 2.5, but the documentation for this feature is lacking. This was working in older versions of ElasticSearch so I assumed it would be available in OpenSearch as well.
Is it safe to assume that it's functional in OpenSearch 2.7?

Thanks!

@gaobinlong
Copy link
Collaborator

I think yes, the related PR #6434 was merged in 2.7, we can see it in the release page: https://github.com/opensearch-project/OpenSearch/releases, and I just tried the parameter in 2.9, it works well.

Besides, forcemerge API in Elasticsearch 7.10.2 doesn't have that parameter, so it's not available in OpenSearch until 2.7.

@dblock
Copy link
Member

dblock commented Sep 28, 2023

I think this is resolved as "works as expected since 2.7", lmk otherwise!

@dblock dblock closed this as completed Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working distributed framework
Projects
None yet
Development

No branches or pull requests

6 participants