Skip to content

Commit fb45fd7

Browse files
authored
[8.x] Remove min_read_only_index_version from XContent node (#119083) (#119114)
* Remove min_read_only_index_version from XContent node (#119083) 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 #118744 * fix
1 parent 01e68a4 commit fb45fd7

File tree

6 files changed

+0
-14
lines changed

6 files changed

+0
-14
lines changed

docs/reference/indices/shard-stores.asciidoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ The API returns the following response:
173173
"roles": [...],
174174
"version": "8.10.0",
175175
"min_index_version": 7000099,
176-
"min_read_only_index_version": 7000099,
177176
"max_index_version": 8100099
178177
},
179178
"allocation_id": "2iNySv_OQVePRX-yaRH_lQ", <4>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,6 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
625625
builder.endArray();
626626
builder.field("version", versionInfo.nodeVersion());
627627
builder.field("min_index_version", versionInfo.minIndexVersion());
628-
builder.field("min_read_only_index_version", versionInfo.minReadOnlyIndexVersion());
629628
builder.field("max_index_version", versionInfo.maxIndexVersion());
630629
builder.endObject();
631630
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
@@ -128,7 +128,6 @@ public void testToXContentWithDeprecatedClusterState() {
128128
],
129129
"version": "%s",
130130
"min_index_version": %s,
131-
"min_read_only_index_version": %s,
132131
"max_index_version": %s
133132
}
134133
},
@@ -220,7 +219,6 @@ public void testToXContentWithDeprecatedClusterState() {
220219
clusterState.getNodes().get("node0").getEphemeralId(),
221220
Version.CURRENT,
222221
IndexVersions.MINIMUM_COMPATIBLE,
223-
IndexVersions.MINIMUM_READONLY_COMPATIBLE,
224222
IndexVersion.current(),
225223
IndexVersion.current(),
226224
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)