Skip to content

Commit

Permalink
Fix up BWC for serialization of GetIndexResponse (elastic#56274)
Browse files Browse the repository at this point in the history
Completes the backport of elastic#56022

Closes elastic#56265
  • Loading branch information
DaveCTurner committed May 6, 2020
1 parent 4aa46a6 commit f4d970a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ public void testRecoveryClosedIndex() throws Exception {
* is effectively closed and potentially replicated if the cluster supports replication of closed indices at the
* time the index was closed.
*/
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/56265")
public void testCloseIndexDuringRollingUpgrade() throws Exception {
final Version minimumNodeVersion = minimumNodeVersion();
final String indexName =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public GetIndexResponse(String[] indices,
}
defaultSettings = defaultSettingsMapBuilder.build();

if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.getVersion().onOrAfter(Version.V_7_8_0)) {
ImmutableOpenMap.Builder<String, String> dataStreamsMapBuilder = ImmutableOpenMap.builder();
int dataStreamsSize = in.readVInt();
for (int i = 0; i < dataStreamsSize; i++) {
Expand Down Expand Up @@ -255,7 +255,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeString(indexEntry.key);
Settings.writeSettingsToStream(indexEntry.value, out);
}
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_8_0)) {
out.writeVInt(dataStreams.size());
for (ObjectObjectCursor<String, String> indexEntry : dataStreams) {
out.writeString(indexEntry.key);
Expand Down

0 comments on commit f4d970a

Please sign in to comment.