Skip to content

Conversation

@PeteGillinElastic
Copy link
Member

Backports the following commits to 9.1:

When the `_reindex` API is used with a remote source (`source.remote`
is set in the request body), neither manual slicing (via
`source.slice` in the request body) nor automatic slicing (via the
`slices` URL parameter) are supported.

Prior to this change, on sending a request with a remote source and
manual slicing enabled, the manual slicing specification would be
ignored, and the complete source would be reindexed without
slicing. After this change, the API will return a response with an
HTTP code 400 (Bad Request) instead.

The new behaviour more correctly indicates to the user that the
requested functionality is not available, rather than silently
ignoring part of their request.

Note that:

- Prior to this change, sending a request with a remote source and
*automatic* slicing enabled already resulted in the correct 400
response.

- The
  [docs](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/reindex-indices#docs-reindex-slice)
  already correctly stated "Reindexing from remote clusters does not
  support manual or automatic slicing."

- As a drive-by, this change also adds a unit test for the validation
  with the `slices` parameter set to `auto`. (Previously, only the
  case where it was set to a number greater than 1 was tested.)

Closes elastic#136269
@PeteGillinElastic PeteGillinElastic added :Data Management/Indices APIs APIs to create and manage indices and templates >bug auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Data Management Meta label for data/management team labels Oct 29, 2025
@elasticsearchmachine elasticsearchmachine merged commit 4b8538e into elastic:9.1 Oct 29, 2025
35 checks passed
@PeteGillinElastic PeteGillinElastic deleted the backport/9.1/pr-137275 branch October 29, 2025 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug :Data Management/Indices APIs APIs to create and manage indices and templates Team:Data Management Meta label for data/management team v9.1.7

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants