Skip to content

Commit 654d525

Browse files
Thomas CallahanThomas Callahan
Thomas Callahan
authored and
Thomas Callahan
committed
Change required version for Get Settings transport API changes to 6.4.0
Get Settings API changes have now been backported to version 6.4, and therefore the latest version must send and expect the extra fields when communicating with 6.4+ code. Relates elastic#29229 elastic#30494
1 parent a8b4a98 commit 654d525

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

server/src/main/java/org/elasticsearch/action/admin/indices/settings/get/GetSettingsRequest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public GetSettingsRequest(StreamInput in) throws IOException {
7171
indicesOptions = IndicesOptions.readIndicesOptions(in);
7272
names = in.readStringArray();
7373
humanReadable = in.readBoolean();
74-
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
74+
if (in.getVersion().onOrAfter(Version.V_6_4_0)) {
7575
includeDefaults = in.readBoolean();
7676
}
7777
}
@@ -83,7 +83,7 @@ public void writeTo(StreamOutput out) throws IOException {
8383
indicesOptions.writeIndicesOptions(out);
8484
out.writeStringArray(names);
8585
out.writeBoolean(humanReadable);
86-
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
86+
if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
8787
out.writeBoolean(includeDefaults);
8888
}
8989
}

server/src/main/java/org/elasticsearch/action/admin/indices/settings/get/GetSettingsResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public void readFrom(StreamInput in) throws IOException {
114114
}
115115
ImmutableOpenMap.Builder<String, Settings> defaultSettingsBuilder = ImmutableOpenMap.builder();
116116

117-
if (in.getVersion().onOrAfter(org.elasticsearch.Version.V_7_0_0_alpha1)) {
117+
if (in.getVersion().onOrAfter(org.elasticsearch.Version.V_6_4_0)) {
118118
int defaultSettingsSize = in.readVInt();
119119
for (int i = 0; i < defaultSettingsSize ; i++) {
120120
defaultSettingsBuilder.put(in.readString(), Settings.readSettingsFromStream(in));
@@ -132,7 +132,7 @@ public void writeTo(StreamOutput out) throws IOException {
132132
out.writeString(cursor.key);
133133
Settings.writeSettingsToStream(cursor.value, out);
134134
}
135-
if (out.getVersion().onOrAfter(org.elasticsearch.Version.V_7_0_0_alpha1)) {
135+
if (out.getVersion().onOrAfter(org.elasticsearch.Version.V_6_4_0)) {
136136
out.writeVInt(indexToDefaultSettings.size());
137137
for (ObjectObjectCursor<String, Settings> cursor : indexToDefaultSettings) {
138138
out.writeString(cursor.key);

0 commit comments

Comments
 (0)