Skip to content

Commit edf1ae9

Browse files
committed
Remove min_read_only_index_version from XContent node
We prefer to remove this information from the API since they are not useful externally, impact the search shard API and may be removed later (which would be a breaking change). Follow-up elastic#118744
1 parent 22c2db8 commit edf1ae9

File tree

5 files changed

+0
-13
lines changed

5 files changed

+0
-13
lines changed

server/src/main/java/org/elasticsearch/cluster/node/DiscoveryNode.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,6 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
595595
builder.endArray();
596596
builder.field("version", versionInfo.buildVersion().toString());
597597
builder.field("min_index_version", versionInfo.minIndexVersion());
598-
builder.field("min_read_only_index_version", versionInfo.minReadOnlyIndexVersion());
599598
builder.field("max_index_version", versionInfo.maxIndexVersion());
600599
builder.endObject();
601600
return builder;

server/src/test/java/org/elasticsearch/action/admin/cluster/reroute/ClusterRerouteResponseTests.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ public void testToXContentWithDeprecatedClusterState() {
127127
],
128128
"version": "%s",
129129
"min_index_version": %s,
130-
"min_read_only_index_version": %s,
131130
"max_index_version": %s
132131
}
133132
},
@@ -219,7 +218,6 @@ public void testToXContentWithDeprecatedClusterState() {
219218
clusterState.getNodes().get("node0").getEphemeralId(),
220219
Version.CURRENT,
221220
IndexVersions.MINIMUM_COMPATIBLE,
222-
IndexVersions.MINIMUM_READONLY_COMPATIBLE,
223221
IndexVersion.current(),
224222
IndexVersion.current(),
225223
IndexVersion.current()

server/src/test/java/org/elasticsearch/cluster/ClusterStateTests.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ public void testToXContent() throws IOException {
213213
],
214214
"version": "%s",
215215
"min_index_version":%s,
216-
"min_read_only_index_version":%s,
217216
"max_index_version":%s
218217
}
219218
},
@@ -390,7 +389,6 @@ public void testToXContent() throws IOException {
390389
ephemeralId,
391390
Version.CURRENT,
392391
IndexVersions.MINIMUM_COMPATIBLE,
393-
IndexVersions.MINIMUM_READONLY_COMPATIBLE,
394392
IndexVersion.current(),
395393
TransportVersion.current(),
396394
IndexVersion.current(),
@@ -490,7 +488,6 @@ public void testToXContent_FlatSettingTrue_ReduceMappingFalse() throws IOExcepti
490488
],
491489
"version" : "%s",
492490
"min_index_version" : %s,
493-
"min_read_only_index_version" : %s,
494491
"max_index_version" : %s
495492
}
496493
},
@@ -666,7 +663,6 @@ public void testToXContent_FlatSettingTrue_ReduceMappingFalse() throws IOExcepti
666663
ephemeralId,
667664
Version.CURRENT,
668665
IndexVersions.MINIMUM_COMPATIBLE,
669-
IndexVersions.MINIMUM_READONLY_COMPATIBLE,
670666
IndexVersion.current(),
671667
TransportVersion.current(),
672668
IndexVersion.current(),
@@ -766,7 +762,6 @@ public void testToXContent_FlatSettingFalse_ReduceMappingTrue() throws IOExcepti
766762
],
767763
"version" : "%s",
768764
"min_index_version" : %s,
769-
"min_read_only_index_version" : %s,
770765
"max_index_version" : %s
771766
}
772767
},
@@ -948,7 +943,6 @@ public void testToXContent_FlatSettingFalse_ReduceMappingTrue() throws IOExcepti
948943
ephemeralId,
949944
Version.CURRENT,
950945
IndexVersions.MINIMUM_COMPATIBLE,
951-
IndexVersions.MINIMUM_READONLY_COMPATIBLE,
952946
IndexVersion.current(),
953947
TransportVersion.current(),
954948
IndexVersion.current(),

server/src/test/java/org/elasticsearch/cluster/node/DiscoveryNodeTests.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,15 +223,13 @@ public void testDiscoveryNodeToXContent() {
223223
],
224224
"version" : "%s",
225225
"min_index_version" : %s,
226-
"min_read_only_index_version" : %s,
227226
"max_index_version" : %s
228227
}
229228
}""",
230229
transportAddress,
231230
withExternalId ? "test-external-id" : "test-name",
232231
Version.CURRENT,
233232
IndexVersions.MINIMUM_COMPATIBLE,
234-
IndexVersions.MINIMUM_READONLY_COMPATIBLE,
235233
IndexVersion.current()
236234
)
237235
)

x-pack/plugin/monitoring/src/test/java/org/elasticsearch/xpack/monitoring/collector/cluster/ClusterStatsMonitoringDocTests.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,6 @@ public void testToXContent() throws IOException {
462462
pluginEsBuildVersion,
463463
Version.CURRENT,
464464
IndexVersions.MINIMUM_COMPATIBLE,
465-
IndexVersions.MINIMUM_READONLY_COMPATIBLE,
466465
IndexVersion.current(),
467466
apmIndicesExist };
468467
final String expectedJson = """
@@ -818,7 +817,6 @@ public void testToXContent() throws IOException {
818817
],
819818
"version": "%s",
820819
"min_index_version":%s,
821-
"min_read_only_index_version":%s,
822820
"max_index_version":%s
823821
}
824822
},

0 commit comments

Comments
 (0)