Skip to content

Conversation

@alexey-ivanov-es
Copy link
Contributor

@alexey-ivanov-es alexey-ivanov-es commented Nov 14, 2025

This change moves the disk watermark check from all nodes to the master node since the check is performed against information in ClusterInfo. Also, it changes what setting values are used - using values from the cluster state if they are set, or from node settings otherwise.

There's a potential edge case: in a mixed cluster (e.g. master 9.2.1 (before the fix), other nodes 9.3 (after the fix)), the check wouldn't be performed. However, due to #137004, the check isn't working in the released versions anyway, so this doesn't make things worse.

Closes #137005

@alexey-ivanov-es alexey-ivanov-es added >bug :Core/Infra/Core Core issues without another label auto-backport Automatically create backport pull requests when merged branch:9.2 branch:9.1 branch:8.19 labels Nov 14, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@elasticsearchmachine
Copy link
Collaborator

Hi @alexey-ivanov-es, I've created a changelog YAML for you.

@alexey-ivanov-es alexey-ivanov-es requested a review from a team November 14, 2025 17:45
@mosche
Copy link
Contributor

mosche commented Nov 17, 2025

sorry, i got distracted... I'll get back to this tomorrow morning @alexey-ivanov-es

Copy link
Contributor

@mosche mosche left a comment

Choose a reason for hiding this comment

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

Looking good, just a few minor nits. But wondering if we should address the testing gap here?

public List<DeprecationIssue> nodeSettingsIssues() {
return nodeSettingsIssues.get();
DeprecationIssue watermarkIssue = diskWatermarkIssue.get();
List<DeprecationIssue> deprecationIssues = nodeSettingsIssues.get();
Copy link
Contributor

Choose a reason for hiding this comment

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

optional nit, how about better distinguishing between the enhanced nodeSettingsIssues and the ones collected from remote nodes, e.g. renaming the latter to remoteNodeSettingsIssues or similar making it more obvious that it's not the same as nodeSettingsIssues that are ultimately returned

assertThat(exception.getCause().getMessage(), containsString("boom"));
}

public void testCheckDiskLowWatermark() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like masterOperation operation isn't covered at all, but obviously that's not new to this PR.
Should that be added? wdyt?

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've added a unit test for it. I wanted to add an integration or REST test, but found it's quite difficult to set up the behavior needed I wanted to test

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 :Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team v8.19.9 v9.1.9 v9.2.3 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GET /_migration/deprecations doesn't check disk watermarks against correct settings

3 participants