Browse Source

Adjust BWC after backport of #64561 (HTTP client stats) (#70508)

Dan Hermann 4 years ago
parent
commit
8a9055a0ca

+ 2 - 2
rest-api-spec/src/main/resources/rest-api-spec/test/nodes.stats/11_indices_metrics.yml

@@ -289,8 +289,8 @@
 "Metric - http":
   - skip:
       features: [arbitrary_key]
-      version: " - 7.99.99"
-      reason: "change after backporting"
+      version: " - 7.12.99"
+      reason: "HTTP client stats added in 7.13.0"
   - do:
       nodes.info: {}
   - set:

+ 2 - 2
server/src/main/java/org/elasticsearch/http/HttpStats.java

@@ -38,7 +38,7 @@ public class HttpStats implements Writeable, ToXContentFragment {
     public HttpStats(StreamInput in) throws IOException {
         serverOpen = in.readVLong();
         totalOpen = in.readVLong();
-        if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
+        if (in.getVersion().onOrAfter(Version.V_7_13_0)) {
             clientStats = in.readList(ClientStats::new);
         } else {
             clientStats = List.of();
@@ -49,7 +49,7 @@ public class HttpStats implements Writeable, ToXContentFragment {
     public void writeTo(StreamOutput out) throws IOException {
         out.writeVLong(serverOpen);
         out.writeVLong(totalOpen);
-        if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
+        if (out.getVersion().onOrAfter(Version.V_7_13_0)) {
             out.writeList(clientStats);
         }
     }