Skip to content

Conversation

@PeteGillinElastic
Copy link
Member

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 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 #136269

  • Have you signed the contributor license agreement?
  • Have you followed the contributor guidelines?
  • If submitting code, have you built your formula locally prior to submission with gradle check?
  • If submitting code, is your pull request against main? Unless there is a good reason otherwise, we prefer pull requests against main and will backport as needed.
  • If submitting code, have you checked that your submission is for an OS and architecture that we support?
  • If you are submitting this code for a class then read our policy for that.

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 >bug :Data Management/Indices APIs APIs to create and manage indices and templates auto-backport Automatically create backport pull requests when merged branch:9.2 branch:9.1 branch:8.19 labels Oct 28, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

@elasticsearchmachine
Copy link
Collaborator

Hi @PeteGillinElastic, I've created a changelog YAML for you.

@samxbr samxbr self-requested a review October 28, 2025 21:17
@PeteGillinElastic PeteGillinElastic merged commit 3850256 into elastic:main Oct 29, 2025
35 checks passed
@PeteGillinElastic PeteGillinElastic deleted the reindex-remote-reject-manual-slicing branch October 29, 2025 10:12
PeteGillinElastic added a commit to PeteGillinElastic/elasticsearch that referenced this pull request Oct 29, 2025
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
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
9.2
8.19
9.1

PeteGillinElastic added a commit to PeteGillinElastic/elasticsearch that referenced this pull request Oct 29, 2025
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
elasticsearchmachine pushed a commit that referenced this pull request Oct 29, 2025
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 #136269
elasticsearchmachine pushed a commit that referenced this pull request Oct 29, 2025
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 #136269
elasticsearchmachine pushed a commit that referenced this pull request Oct 29, 2025
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 #136269
chrisparrinello pushed a commit to chrisparrinello/elasticsearch that referenced this pull request Nov 3, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >bug :Data Management/Indices APIs APIs to create and manage indices and templates Team:Data Management Meta label for data/management team v8.19.7 v9.1.7 v9.2.1 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reindex from remote silently ignores manual slicing parameters

3 participants