Skip to content

[BUG] max_primary_shard_size parameter does not exist in Shrink API #5170

@gaobinlong

Description

@gaobinlong

Describe the bug
As the Shrink API's document says, there is a request parameter named max_primary_shard_size which can be used to set the maximum size of a primary shard in the target index, but the parameter does not exist in opensearch actually.

To Reproduce

POST a/_shrink/e
{
  "max_primary_shard_size":"50gb"
}

the response is :

{
  "error" : {
    "root_cause" : [
      {
        "type" : "x_content_parse_exception",
        "reason" : "[2:3] [resize_request] unknown field [max_primary_shard_size]"
      }
    ],
    "type" : "x_content_parse_exception",
    "reason" : "[2:3] [resize_request] unknown field [max_primary_shard_size]"
  },
  "status" : 400
}

Expected behavior
Maybe we should remove the request parameter max_primary_shard_size from the document temporarily and add it back after we implement the function.

Screenshots
image

Host/Environment (please complete the following information):

  • OS: [MacOS]
  • Version [12.6]
  • OpenSearch Version: 2.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions