Backport periodic flush count to v6.3.0

Relates #29360
This commit is contained in:
Nhat Nguyen 2018-04-11 17:14:09 -04:00
parent 263349f628
commit 067fbb8ecd
2 changed files with 4 additions and 4 deletions

View File

@ -25,8 +25,8 @@
--- ---
"Flush stats": "Flush stats":
- skip: - skip:
version: " - 6.99.99" version: " - 6.2.99"
reason: periodic flush stats is introduced in 7.0 reason: periodic flush stats is introduced in 6.3.0
- do: - do:
indices.create: indices.create:
index: test index: test

View File

@ -114,7 +114,7 @@ public class FlushStats implements Streamable, ToXContentFragment {
public void readFrom(StreamInput in) throws IOException { public void readFrom(StreamInput in) throws IOException {
total = in.readVLong(); total = in.readVLong();
totalTimeInMillis = in.readVLong(); totalTimeInMillis = in.readVLong();
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { if (in.getVersion().onOrAfter(Version.V_6_3_0)) {
periodic = in.readVLong(); periodic = in.readVLong();
} }
} }
@ -123,7 +123,7 @@ public class FlushStats implements Streamable, ToXContentFragment {
public void writeTo(StreamOutput out) throws IOException { public void writeTo(StreamOutput out) throws IOException {
out.writeVLong(total); out.writeVLong(total);
out.writeVLong(totalTimeInMillis); out.writeVLong(totalTimeInMillis);
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) { if (out.getVersion().onOrAfter(Version.V_6_3_0)) {
out.writeVLong(periodic); out.writeVLong(periodic);
} }
} }