During the development and review process of the disk health indicator we noticed that it was hard to understand. Since we learnt a lot from the first round of development we want to go through the code one more time and restructure it.
server/src/main/java/org/elasticsearch/health/node/DiskHealthIndicatorService.java
getTruncatedIndices(indicesWithBlock, clusterState.getMetadata())
                    ),
                    List.of(ImpactArea.INGEST)
                )
            );
        } else if (indicesOnUnhealthyNodes.isEmpty() == false) {
            impacts.add(
                new HealthIndicatorImpact(
                    NAME,
                    IMPACT_INGEST_AT_RISK_ID,
                    1,
                    String.format(
                        Locale.ROOT,
                        "The cluster is at risk of not being able to insert or update documents in the affected indices [%s].",
                        getTruncatedIndices(indicesOnUnhealthyNodes, clusterState.metadata())
                    ),
                    List.of(ImpactArea.INGEST)
                )
            );
        }
        Set<String> unhealthyNodes = Stream.concat(nodesReportingRed.stream(), nodesReportingYellow.stream()).collect(Collectors.toSet());
        Set<DiscoveryNodeRole> unhealthyRoles = getRolesOnNodes(unhealthyNodes, clusterState);
        if (unhealthyRoles.contains(DiscoveryNodeRole.MASTER_ROLE)) {
            impacts.add(
                new HealthIndicatorImpact(
                    NAME,
                    IMPACT_CLUSTER_STABILITY_AT_RISK_ID,
                    2,
                    "Cluster stability might be impaired.",
                    List.of(ImpactArea.DEPLOYMENT_MANAGEMENT)