Skip to content

Commit

Permalink
Fix bad version check writing Repository nodes (#30846)
Browse files Browse the repository at this point in the history
The writeTo method of VerifyRepositoryResponse incorrectly used its
local version to determine what it was receiving, rather than the
sender's version. This fixes a bug that ocassionally happened when a 6.4
master node sent data to a 7.0 client, causing the number of bytes to be
improperly read. This also unmutes the test.

Closes #30807
  • Loading branch information
hub-cap committed May 25, 2018
1 parent 97cd3fc commit a364f18
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void readFrom(StreamInput in) throws IOException {
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
if (Version.CURRENT.onOrAfter(Version.V_6_4_0)) {
if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
out.writeList(getNodes());
} else {
clusterName.writeTo(out);
Expand Down

0 comments on commit a364f18

Please sign in to comment.