Skip to content

Commit

Permalink
Update version checks for shard search idle metric after backport to …
Browse files Browse the repository at this point in the history
…2.x (opensearch-project#12972)

Signed-off-by: Shivansh Arora <[email protected]>
  • Loading branch information
ruai0511 authored and shiv0408 committed Apr 25, 2024
1 parent e9b9348 commit 1c690aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"Help":
- skip:
version: " - 2.99.99"
version: " - 2.13.99"
reason: search idle reactivate count total is only added in 3.0.0
features: node_selector
- do:
cat.shards:
help: true
node_selector:
version: "3.0.0 - "
version: "2.14.0 - "

- match:
$body: |
Expand Down Expand Up @@ -93,16 +93,16 @@
docs.deleted .+ \n
$/
---
"Help from 2.12.0 to 2.99.99":
"Help from 2.12.0 to 2.13.99":
- skip:
version: " - 2.11.99 , 3.0.0 - "
version: " - 2.11.99 , 2.14.0 - "
reason: deleted docs and concurrent search are added in 2.12.0
features: node_selector
- do:
cat.shards:
help: true
node_selector:
version: "2.12.0 - 2.99.99"
version: "2.12.0 - 2.13.99"

- match:
$body: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ private Stats(StreamInput in) throws IOException {
queryConcurrency = in.readVLong();
}

if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_14_0)) {
searchIdleReactivateCount = in.readVLong();
}
}
Expand Down Expand Up @@ -475,7 +475,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeVLong(queryConcurrency);
}

if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_14_0)) {
out.writeVLong(searchIdleReactivateCount);
}
}
Expand Down

0 comments on commit 1c690aa

Please sign in to comment.