Skip to content

Commit

Permalink
Fix bad version check writing Repository nodes
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 elastic#30807
  • Loading branch information
hub-cap committed May 24, 2018
1 parent f55b09b commit 571ecd9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ setup:

---
"Verify created repository":
- skip:
version: " - 6.99.99"
reason: AwaitsFix for https://github.com/elastic/elasticsearch/issues/30807
- do:
snapshot.verify_repository:
repository: test_repo_get_2
Expand Down
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_7_0_0_alpha1)) {
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
out.writeList(getNodes());
} else {
clusterName.writeTo(out);
Expand Down

0 comments on commit 571ecd9

Please sign in to comment.