Skip to content

Remove ILM-stopped-check before the cluster update in migrateToDataTiersRouting (#140885)#140892

Merged
elasticsearchmachine merged 7 commits intoelastic:mainfrom
gmarouli:fix-140885
Jan 20, 2026
Merged

Remove ILM-stopped-check before the cluster update in migrateToDataTiersRouting (#140885)#140892
elasticsearchmachine merged 7 commits intoelastic:mainfrom
gmarouli:fix-140885

Conversation

@gmarouli
Copy link
Contributor

@gmarouli gmarouli commented Jan 19, 2026

In order to run the migrate data tiers request, we need to ensure that ILM is stopped. In the TransportMigrateToDataTiersAction we performed this check twice:

  1. The first time was when the API was called to avoid creating cluster state updates that were bound to fail.
  2. The second time was during the cluster state update, to ensure that the cluster state has the correct conditions when applying the change.

It is possible that the first check is applied on an outdated cluster state causing the request to fail while it could succeed.

In this PR, considering the usage patterns of this API, we believe the benefit of the first check is very small, so we keep only the second which is the up-to-date one.

Relevant test:

https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/MigrateToDataTiersIT.java#L82-L87

Fixes #140885

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-storage-engine (Team:StorageEngine)

@gmarouli gmarouli added the >bug label Jan 19, 2026
@elasticsearchmachine
Copy link
Collaborator

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

@@ -0,0 +1,6 @@
pr: 140892
summary: Remove ILM-stopped-check before the cluster update in `migrateToDataTiersRouting`
area: ILM+SLM
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have opened #140895 to fix the area labels

@gmarouli gmarouli requested a review from martijnvg January 19, 2026 14:05
Copy link
Member

@martijnvg martijnvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gmarouli gmarouli added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Jan 20, 2026
@elasticsearchmachine elasticsearchmachine merged commit d6a8300 into elastic:main Jan 20, 2026
35 checks passed
@gmarouli gmarouli deleted the fix-140885 branch January 20, 2026 08:08
gmarouli added a commit to gmarouli/elasticsearch that referenced this pull request Jan 20, 2026
…iersRouting` (elastic#140885) (elastic#140892)

In order to run the migrate data tiers request, we need to ensure that
ILM is stopped. In the `TransportMigrateToDataTiersAction` we performed
this check twice:

1. The first time was when the API was called to avoid creating cluster state updates that were bound to fail.
2. The second time was during the cluster state update, to ensure that the cluster state has the correct conditions when applying the change.

It is possible that the first check is applied on an outdated cluster
state causing the request to fail while it could succeed.

In this PR, considering the usage patterns of this API, we believe the
benefit of the first check is very small, so we keep only the second
which is the up-to-date one.

Relevant test:

https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/MigrateToDataTiersIT.java#L82-L87

Fixes elastic#140885
gmarouli added a commit to gmarouli/elasticsearch that referenced this pull request Jan 20, 2026
…iersRouting` (elastic#140885) (elastic#140892)

In order to run the migrate data tiers request, we need to ensure that
ILM is stopped. In the `TransportMigrateToDataTiersAction` we performed
this check twice:

1. The first time was when the API was called to avoid creating cluster state updates that were bound to fail.
2. The second time was during the cluster state update, to ensure that the cluster state has the correct conditions when applying the change.

It is possible that the first check is applied on an outdated cluster
state causing the request to fail while it could succeed.

In this PR, considering the usage patterns of this API, we believe the
benefit of the first check is very small, so we keep only the second
which is the up-to-date one.

Relevant test:

https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/MigrateToDataTiersIT.java#L82-L87

Fixes elastic#140885
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
9.3
9.1
9.2
gmarouli added a commit to gmarouli/elasticsearch that referenced this pull request Jan 20, 2026
…iersRouting` (elastic#140885) (elastic#140892)

In order to run the migrate data tiers request, we need to ensure that
ILM is stopped. In the `TransportMigrateToDataTiersAction` we performed
this check twice:

1. The first time was when the API was called to avoid creating cluster state updates that were bound to fail.
2. The second time was during the cluster state update, to ensure that the cluster state has the correct conditions when applying the change.

It is possible that the first check is applied on an outdated cluster
state causing the request to fail while it could succeed.

In this PR, considering the usage patterns of this API, we believe the
benefit of the first check is very small, so we keep only the second
which is the up-to-date one.

Relevant test:

https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/MigrateToDataTiersIT.java#L82-L87

Fixes elastic#140885
elasticsearchmachine pushed a commit that referenced this pull request Jan 20, 2026
…iersRouting` (#140885) (#140892) (#140950)

In order to run the migrate data tiers request, we need to ensure that
ILM is stopped. In the `TransportMigrateToDataTiersAction` we performed
this check twice:

1. The first time was when the API was called to avoid creating cluster state updates that were bound to fail.
2. The second time was during the cluster state update, to ensure that the cluster state has the correct conditions when applying the change.

It is possible that the first check is applied on an outdated cluster
state causing the request to fail while it could succeed.

In this PR, considering the usage patterns of this API, we believe the
benefit of the first check is very small, so we keep only the second
which is the up-to-date one.

Relevant test:

https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/MigrateToDataTiersIT.java#L82-L87

Fixes #140885
elasticsearchmachine pushed a commit that referenced this pull request Jan 20, 2026
…iersRouting` (#140885) (#140892) (#140949)

In order to run the migrate data tiers request, we need to ensure that
ILM is stopped. In the `TransportMigrateToDataTiersAction` we performed
this check twice:

1. The first time was when the API was called to avoid creating cluster state updates that were bound to fail.
2. The second time was during the cluster state update, to ensure that the cluster state has the correct conditions when applying the change.

It is possible that the first check is applied on an outdated cluster
state causing the request to fail while it could succeed.

In this PR, considering the usage patterns of this API, we believe the
benefit of the first check is very small, so we keep only the second
which is the up-to-date one.

Relevant test:

https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/MigrateToDataTiersIT.java#L82-L87

Fixes #140885
elasticsearchmachine pushed a commit that referenced this pull request Jan 20, 2026
…iersRouting` (#140885) (#140892) (#140951)

In order to run the migrate data tiers request, we need to ensure that
ILM is stopped. In the `TransportMigrateToDataTiersAction` we performed
this check twice:

1. The first time was when the API was called to avoid creating cluster state updates that were bound to fail.
2. The second time was during the cluster state update, to ensure that the cluster state has the correct conditions when applying the change.

It is possible that the first check is applied on an outdated cluster
state causing the request to fail while it could succeed.

In this PR, considering the usage patterns of this API, we believe the
benefit of the first check is very small, so we keep only the second
which is the up-to-date one.

Relevant test:

https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/MigrateToDataTiersIT.java#L82-L87

Fixes #140885
spinscale pushed a commit to spinscale/elasticsearch that referenced this pull request Jan 21, 2026
…iersRouting` (elastic#140885) (elastic#140892)

In order to run the migrate data tiers request, we need to ensure that
ILM is stopped. In the `TransportMigrateToDataTiersAction` we performed
this check twice:

1. The first time was when the API was called to avoid creating cluster state updates that were bound to fail.
2. The second time was during the cluster state update, to ensure that the cluster state has the correct conditions when applying the change.

It is possible that the first check is applied on an outdated cluster
state causing the request to fail while it could succeed.

In this PR, considering the usage patterns of this API, we believe the
benefit of the first check is very small, so we keep only the second
which is the up-to-date one.

Relevant test:

https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/MigrateToDataTiersIT.java#L82-L87

Fixes elastic#140885
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 auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) >bug :StorageEngine/ILM Index Lifecycle Management Team:StorageEngine v9.1.11 v9.2.5 v9.3.1 v9.4.0

3 participants