Skip to content

Conversation

@nielsbauman
Copy link
Contributor

Since the cluster state API no longer runs on the master node, we need to wait for the cluster state publication to have finished before retrieving the cluster state.

Fixes #130853

Since the cluster state API no longer runs on the master node, we need
to wait for the cluster state publication to have finished before
retrieving the cluster state.

Fixes elastic#130853
@nielsbauman nielsbauman requested a review from masseyke July 8, 2025 22:34
@nielsbauman nielsbauman added >test Issues or PRs that are addressing/adding tests :Data Management/ILM+SLM Index and Snapshot lifecycle management labels Jul 8, 2025
@elasticsearchmachine elasticsearchmachine added v9.2.0 Team:Data Management Meta label for data/management team labels Jul 8, 2025
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Member

@masseyke masseyke left a comment

Choose a reason for hiding this comment

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

LGTM. I'm not very familiar with this test though. Do we need the same awaitMasterNode() call in assertClusterStateNotSaved()? And is the call to awaitMasterNode() for a single node just before calling assertClusterStateSaveOK() now redundant?

@nielsbauman
Copy link
Contributor Author

Thanks for the review, @masseyke!

Do we need the same awaitMasterNode() call in assertClusterStateNotSaved()?

Good question, I hadn't considered it yet. Looking at it now, we don't need awawitMasterNode() there, as we're setting up the cluster state listener on the master node (instead of the data node compared to the other test). Cluster state listeners depend on the cluster state in ClusterApplierService, which only gets updated on the master node once a cluster state has been published to all nodes in the cluster, which guarantees all other nodes are at least on that cluster state.

And is the call to awaitMasterNode() for a single node just before calling assertClusterStateSaveOK() now redundant?

Another great question! You're right; I've removed that call. Thanks a lot for the review!

@nielsbauman nielsbauman enabled auto-merge (squash) July 14, 2025 18:20
@nielsbauman nielsbauman merged commit 1841079 into elastic:main Jul 14, 2025
33 checks passed
@nielsbauman nielsbauman deleted the fix-130853 branch July 14, 2025 19:51
mridula-s109 pushed a commit to mridula-s109/elasticsearch that referenced this pull request Jul 17, 2025
…elastic#130869)

Since the cluster state API no longer runs on the master node, we need
to wait for the cluster state publication to have finished before
retrieving the cluster state.

Fixes elastic#130853
mridula-s109 pushed a commit to mridula-s109/elasticsearch that referenced this pull request Jul 17, 2025
…elastic#130869)

Since the cluster state API no longer runs on the master node, we need
to wait for the cluster state publication to have finished before
retrieving the cluster state.

Fixes elastic#130853
nielsbauman added a commit that referenced this pull request Nov 6, 2025
This is pretty much a copy of #130869.

Since the cluster state API no longer runs on the master node, we need to wait for the cluster state publication to have finished before retrieving the cluster state.

Fixes #137258
nielsbauman added a commit to nielsbauman/elasticsearch that referenced this pull request Nov 6, 2025
…37669)

This is pretty much a copy of elastic#130869.

Since the cluster state API no longer runs on the master node, we need to wait for the cluster state publication to have finished before retrieving the cluster state.

Fixes elastic#137258

(cherry picked from commit bc5bc54)

# Conflicts:
#	muted-tests.yml
afoucret pushed a commit to afoucret/elasticsearch that referenced this pull request Nov 6, 2025
…37669)

This is pretty much a copy of elastic#130869.

Since the cluster state API no longer runs on the master node, we need to wait for the cluster state publication to have finished before retrieving the cluster state.

Fixes elastic#137258
Kubik42 pushed a commit to Kubik42/elasticsearch that referenced this pull request Nov 10, 2025
…37669)

This is pretty much a copy of elastic#130869.

Since the cluster state API no longer runs on the master node, we need to wait for the cluster state publication to have finished before retrieving the cluster state.

Fixes elastic#137258
nielsbauman added a commit that referenced this pull request Nov 10, 2025
…137676)

This is pretty much a copy of #130869.

Since the cluster state API no longer runs on the master node, we need to wait for the cluster state publication to have finished before retrieving the cluster state.

Fixes #137258
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/ILM+SLM Index and Snapshot lifecycle management Team:Data Management Meta label for data/management team >test Issues or PRs that are addressing/adding tests v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] SLMFileSettingsIT testSettingsApplied failing

3 participants