Add disk thresholds in the cluster state#88175
Conversation
|
@elasticmachine run elasticsearch-ci/part-2 |
|
@dakrone referring to #87975 (review) I think there is a misunderstanding. The health metadata are not supposed to be node specific, we intend them to be the same for all the nodes of the cluster and determined by the master node. Effectively, that's what is happening right when ti comes to allocation too. All nodes have disk threshold settings (potentially different ones), but the elected master node will use their own in the allocation decider. In a similar way, we want the master node to propagate the thresholds so every node can check their disk usage and report back using the same thresholds. Is this more clear now? |
server/src/main/java/org/elasticsearch/cluster/routing/allocation/DiskThresholdSettings.java
Show resolved
Hide resolved
andreidan
left a comment
There was a problem hiding this comment.
Thanks for working on this Mary.
I've left a few suggestions and questions
server/src/main/java/org/elasticsearch/cluster/routing/allocation/DiskThresholdSettings.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/health/metadata/HealthMetadataService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/health/metadata/HealthMetadataService.java
Outdated
Show resolved
Hide resolved
server/src/internalClusterTest/java/org/elasticsearch/health/HealthMetadataServiceIT.java
Outdated
Show resolved
Hide resolved
|
@elasticmachine update branch |
server/src/main/java/org/elasticsearch/health/metadata/HealthMetadataService.java
Outdated
Show resolved
Hide resolved
|
@elasticmachine update branch |
andreidan
left a comment
There was a problem hiding this comment.
LGTM, thanks for iterating on this Mary
server/src/main/java/org/elasticsearch/health/metadata/HealthMetadataService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/health/metadata/HealthMetadataService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/health/metadata/HealthMetadataService.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/health/metadata/HealthMetadataService.java
Outdated
Show resolved
Hide resolved
|
@elasticmachine update branch |
|
@elasticmachine update branch |
|
Dotting the i's and crossing the t's
|
server/src/main/java/org/elasticsearch/common/unit/RelativeByteSizeValue.java
Outdated
Show resolved
Hide resolved
|
@elasticmachine update branch |
Problem statement
For a data node, we use the watermarks to determine if a node's disk usage is healthy. The watermarks can be configured in different ways and it's possible that each node has a different watermark configuration. This is not desirable, we want to use the same thresholds for all nodes and specifically the ones that the master is using.
Proposal
When a node is a elected as master, it will add a custom metadata to the cluster state that will describe these thresholds. For example:
In this PR, we introduce the health metadata and we wire the existing disk thresholds to update the health metadata in the cluster state.
Part of #84811