Skip to content

Commit

Permalink
Remove min_read_only_index_version from XContent node (#119083)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tlrx authored Dec 19, 2024
1 parent 338d2bd commit 77eb191
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,6 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
builder.endArray();
builder.field("version", versionInfo.buildVersion().toString());
builder.field("min_index_version", versionInfo.minIndexVersion());
builder.field("min_read_only_index_version", versionInfo.minReadOnlyIndexVersion());
builder.field("max_index_version", versionInfo.maxIndexVersion());
builder.endObject();
return builder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ public void testToXContentWithDeprecatedClusterState() {
],
"version": "%s",
"min_index_version": %s,
"min_read_only_index_version": %s,
"max_index_version": %s
}
},
Expand Down Expand Up @@ -219,7 +218,6 @@ public void testToXContentWithDeprecatedClusterState() {
clusterState.getNodes().get("node0").getEphemeralId(),
Version.CURRENT,
IndexVersions.MINIMUM_COMPATIBLE,
IndexVersions.MINIMUM_READONLY_COMPATIBLE,
IndexVersion.current(),
IndexVersion.current(),
IndexVersion.current()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ public void testToXContent() throws IOException {
],
"version": "%s",
"min_index_version":%s,
"min_read_only_index_version":%s,
"max_index_version":%s
}
},
Expand Down Expand Up @@ -390,7 +389,6 @@ public void testToXContent() throws IOException {
ephemeralId,
Version.CURRENT,
IndexVersions.MINIMUM_COMPATIBLE,
IndexVersions.MINIMUM_READONLY_COMPATIBLE,
IndexVersion.current(),
TransportVersion.current(),
IndexVersion.current(),
Expand Down Expand Up @@ -490,7 +488,6 @@ public void testToXContent_FlatSettingTrue_ReduceMappingFalse() throws IOExcepti
],
"version" : "%s",
"min_index_version" : %s,
"min_read_only_index_version" : %s,
"max_index_version" : %s
}
},
Expand Down Expand Up @@ -666,7 +663,6 @@ public void testToXContent_FlatSettingTrue_ReduceMappingFalse() throws IOExcepti
ephemeralId,
Version.CURRENT,
IndexVersions.MINIMUM_COMPATIBLE,
IndexVersions.MINIMUM_READONLY_COMPATIBLE,
IndexVersion.current(),
TransportVersion.current(),
IndexVersion.current(),
Expand Down Expand Up @@ -766,7 +762,6 @@ public void testToXContent_FlatSettingFalse_ReduceMappingTrue() throws IOExcepti
],
"version" : "%s",
"min_index_version" : %s,
"min_read_only_index_version" : %s,
"max_index_version" : %s
}
},
Expand Down Expand Up @@ -948,7 +943,6 @@ public void testToXContent_FlatSettingFalse_ReduceMappingTrue() throws IOExcepti
ephemeralId,
Version.CURRENT,
IndexVersions.MINIMUM_COMPATIBLE,
IndexVersions.MINIMUM_READONLY_COMPATIBLE,
IndexVersion.current(),
TransportVersion.current(),
IndexVersion.current(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,13 @@ public void testDiscoveryNodeToXContent() {
],
"version" : "%s",
"min_index_version" : %s,
"min_read_only_index_version" : %s,
"max_index_version" : %s
}
}""",
transportAddress,
withExternalId ? "test-external-id" : "test-name",
Version.CURRENT,
IndexVersions.MINIMUM_COMPATIBLE,
IndexVersions.MINIMUM_READONLY_COMPATIBLE,
IndexVersion.current()
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,6 @@ public void testToXContent() throws IOException {
pluginEsBuildVersion,
Version.CURRENT,
IndexVersions.MINIMUM_COMPATIBLE,
IndexVersions.MINIMUM_READONLY_COMPATIBLE,
IndexVersion.current(),
apmIndicesExist };
final String expectedJson = """
Expand Down Expand Up @@ -818,7 +817,6 @@ public void testToXContent() throws IOException {
],
"version": "%s",
"min_index_version":%s,
"min_read_only_index_version":%s,
"max_index_version":%s
}
},
Expand Down

0 comments on commit 77eb191

Please sign in to comment.