From 067fbb8ecd91292647b610a6cf9f6bd70a6892b3 Mon Sep 17 00:00:00 2001 From: Nhat Nguyen Date: Wed, 11 Apr 2018 17:14:09 -0400 Subject: [PATCH] Backport periodic flush count to v6.3.0 Relates #29360 --- .../resources/rest-api-spec/test/indices.flush/10_basic.yml | 4 ++-- .../main/java/org/elasticsearch/index/flush/FlushStats.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.flush/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.flush/10_basic.yml index ab34484b8cf..f80f6b1096b 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/indices.flush/10_basic.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/indices.flush/10_basic.yml @@ -25,8 +25,8 @@ --- "Flush stats": - skip: - version: " - 6.99.99" - reason: periodic flush stats is introduced in 7.0 + version: " - 6.2.99" + reason: periodic flush stats is introduced in 6.3.0 - do: indices.create: index: test diff --git a/server/src/main/java/org/elasticsearch/index/flush/FlushStats.java b/server/src/main/java/org/elasticsearch/index/flush/FlushStats.java index 8ce5adca157..02e44dac105 100644 --- a/server/src/main/java/org/elasticsearch/index/flush/FlushStats.java +++ b/server/src/main/java/org/elasticsearch/index/flush/FlushStats.java @@ -114,7 +114,7 @@ public class FlushStats implements Streamable, ToXContentFragment { public void readFrom(StreamInput in) throws IOException { total = 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(); } } @@ -123,7 +123,7 @@ public class FlushStats implements Streamable, ToXContentFragment { public void writeTo(StreamOutput out) throws IOException { out.writeVLong(total); 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); } }