mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-25 09:28:27 +00:00
Cluster state REST api: print routing_nodes out only when requested through specific flag
For bacwards compatibility reasons routing_nodes were previously printed out when routing_table was requested, together with the actual routing_table. Now they are printed out only when requests through `routing_nodes` flag. Relates to #10412 Closes #10486
This commit is contained in:
parent
174d141512
commit
acabf2d55a
@ -371,3 +371,9 @@ over AJAX instead:
|
||||
http.cors.enabled: true
|
||||
http.cors.allow-origin: /https?:\/\/localhost(:[0-9]+)?/
|
||||
---------------
|
||||
|
||||
=== Cluster state REST api
|
||||
|
||||
The cluster state api doesn't return the `routing_nodes` section anymore when
|
||||
`routing_table` is requested. The newly introduced `routing_nodes` flag can
|
||||
be used separately to control whether `routing_nodes` should be returned.
|
||||
|
@ -81,7 +81,7 @@ setup:
|
||||
- is_false: nodes
|
||||
- is_false: metadata
|
||||
- is_true: routing_table
|
||||
- is_true: routing_nodes
|
||||
- is_false: routing_nodes
|
||||
|
||||
---
|
||||
"Filtering the cluster state by routing nodes only should work":
|
||||
|
@ -464,8 +464,7 @@ public class ClusterState implements ToXContent {
|
||||
}
|
||||
|
||||
// routing nodes
|
||||
// gets printed out even if only routing_table was requested for bw comp reasons
|
||||
if (metrics.contains(Metric.ROUTING_TABLE) || metrics.contains(Metric.ROUTING_NODES)) {
|
||||
if (metrics.contains(Metric.ROUTING_NODES)) {
|
||||
builder.startObject("routing_nodes");
|
||||
builder.startArray("unassigned");
|
||||
for (ShardRouting shardRouting : readOnlyRoutingNodes().unassigned()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user