Skip to content

Commit 8426e14

Browse files
authored
Update version checks for shard search idle metric after backport to 2.x (opensearch-project#12972)
1 parent eba3b57 commit 8426e14

File tree

2 files changed

+7
-7
lines changed
  • rest-api-spec/src/main/resources/rest-api-spec/test/cat.shards
  • server/src/main/java/org/opensearch/index/search/stats

2 files changed

+7
-7
lines changed

rest-api-spec/src/main/resources/rest-api-spec/test/cat.shards/10_basic.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"Help":
22
- skip:
3-
version: " - 2.99.99"
3+
version: " - 2.13.99"
44
reason: search idle reactivate count total is only added in 3.0.0
55
features: node_selector
66
- do:
77
cat.shards:
88
help: true
99
node_selector:
10-
version: "3.0.0 - "
10+
version: "2.14.0 - "
1111

1212
- match:
1313
$body: |
@@ -93,16 +93,16 @@
9393
docs.deleted .+ \n
9494
$/
9595
---
96-
"Help from 2.12.0 to 2.99.99":
96+
"Help from 2.12.0 to 2.13.99":
9797
- skip:
98-
version: " - 2.11.99 , 3.0.0 - "
98+
version: " - 2.11.99 , 2.14.0 - "
9999
reason: deleted docs and concurrent search are added in 2.12.0
100100
features: node_selector
101101
- do:
102102
cat.shards:
103103
help: true
104104
node_selector:
105-
version: "2.12.0 - 2.99.99"
105+
version: "2.12.0 - 2.13.99"
106106

107107
- match:
108108
$body: |

server/src/main/java/org/opensearch/index/search/stats/SearchStats.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ private Stats(StreamInput in) throws IOException {
261261
queryConcurrency = in.readVLong();
262262
}
263263

264-
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
264+
if (in.getVersion().onOrAfter(Version.V_2_14_0)) {
265265
searchIdleReactivateCount = in.readVLong();
266266
}
267267
}
@@ -475,7 +475,7 @@ public void writeTo(StreamOutput out) throws IOException {
475475
out.writeVLong(queryConcurrency);
476476
}
477477

478-
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
478+
if (out.getVersion().onOrAfter(Version.V_2_14_0)) {
479479
out.writeVLong(searchIdleReactivateCount);
480480
}
481481
}

0 commit comments

Comments
 (0)