From ea39716352a837af5462e8683665b1025a5088a5 Mon Sep 17 00:00:00 2001 From: Tim Brooks Date: Wed, 29 Jul 2020 11:30:23 -0600 Subject: [PATCH] Reenable BWC after memory limit api backport This commit reenables BWC and updates version constants after the bacport of #60342. --- build.gradle | 4 ++-- .../rest-api-spec/test/nodes.stats/50_indexing_pressure.yml | 3 +-- .../elasticsearch/index/stats/IndexingPressureStats.java | 6 ++---- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 47bdd16b9b04a..44f3d4559ec0a 100644 --- a/build.gradle +++ b/build.gradle @@ -174,8 +174,8 @@ tasks.register("verifyVersions") { * after the backport of the backcompat code is complete. */ -boolean bwc_tests_enabled = false -final String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/60342" /* place a PR link here when committing bwc changes */ +boolean bwc_tests_enabled = true +final String bwc_tests_disabled_issue = "" /* place a PR link here when committing bwc changes */ if (bwc_tests_enabled == false) { if (bwc_tests_disabled_issue.isEmpty()) { throw new GradleException("bwc_tests_disabled_issue must be set when bwc_tests_enabled == false") diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/nodes.stats/50_indexing_pressure.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/nodes.stats/50_indexing_pressure.yml index 27e142181b0ca..c08f8579e6ece 100644 --- a/rest-api-spec/src/main/resources/rest-api-spec/test/nodes.stats/50_indexing_pressure.yml +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/nodes.stats/50_indexing_pressure.yml @@ -32,8 +32,7 @@ --- "Indexing pressure memory limit": - skip: - # Change to 7.9.99 on backport - version: " - 7.10.99" + version: " - 7.9.99" reason: "memory limit was added in 7.10" features: [arbitrary_key] diff --git a/server/src/main/java/org/elasticsearch/index/stats/IndexingPressureStats.java b/server/src/main/java/org/elasticsearch/index/stats/IndexingPressureStats.java index 778aebdca5ebe..27afc8dfa6fd9 100644 --- a/server/src/main/java/org/elasticsearch/index/stats/IndexingPressureStats.java +++ b/server/src/main/java/org/elasticsearch/index/stats/IndexingPressureStats.java @@ -61,8 +61,7 @@ public IndexingPressureStats(StreamInput in) throws IOException { primaryRejections = in.readVLong(); replicaRejections = in.readVLong(); - // TODO: Change to 7.10 after backport - if (in.getVersion().onOrAfter(Version.V_8_0_0)) { + if (in.getVersion().onOrAfter(Version.V_7_10_0)) { memoryLimit = in.readVLong(); } else { memoryLimit = -1L; @@ -103,8 +102,7 @@ public void writeTo(StreamOutput out) throws IOException { out.writeVLong(primaryRejections); out.writeVLong(replicaRejections); - // TODO: Change to 7.10 after backport - if (out.getVersion().onOrAfter(Version.V_8_0_0)) { + if (out.getVersion().onOrAfter(Version.V_7_10_0)) { out.writeVLong(memoryLimit); } }