Skip to content

Commit

Permalink
Update versions for indexing pressure backport (#59472)
Browse files Browse the repository at this point in the history
This commit updates the node stats version constants to reflect the fact
that index pressure stats were backported to 7.9. It also reenables BWC
tests.
  • Loading branch information
Tim-Brooks committed Jul 14, 2020
1 parent 5d7271a commit 9f22634
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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/59467" /* 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")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
"Indexing pressure stats":
- skip:
version: " - 7.99.99"
reason: "indexing_pressure not in prior versions"
version: " - 7.8.99"
reason: "indexing_pressure was added in 7.9"
features: [arbitrary_key]

- do:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ public NodeStats(StreamInput in) throws IOException {
discoveryStats = in.readOptionalWriteable(DiscoveryStats::new);
ingestStats = in.readOptionalWriteable(IngestStats::new);
adaptiveSelectionStats = in.readOptionalWriteable(AdaptiveSelectionStats::new);
// TODO: Change after backport
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.getVersion().onOrAfter(Version.V_7_9_0)) {
indexingPressureStats = in.readOptionalWriteable(IndexingPressureStats::new);
} else {
indexingPressureStats = null;
Expand Down Expand Up @@ -267,8 +266,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeOptionalWriteable(discoveryStats);
out.writeOptionalWriteable(ingestStats);
out.writeOptionalWriteable(adaptiveSelectionStats);
// TODO: Change after backport
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_9_0)) {
out.writeOptionalWriteable(indexingPressureStats);
}
}
Expand Down

0 comments on commit 9f22634

Please sign in to comment.