Skip to content

Commit

Permalink
update version check as per v2.11.0
Browse files Browse the repository at this point in the history
Signed-off-by: Rohit Ashiwal <rashiwal@amazon.com>
  • Loading branch information
r1walz committed Sep 28, 2023
1 parent 159f214 commit ae8bde7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@
---
"Metric - indexing doc_status":
- skip:
version: " - 2.99.99"
reason: "To be introduced in future release :: TODO: change if/when we backport to 2.x"
version: " - 2.10.99"
reason: "Doc Status Stats were introduced in v2.11.0"
- do:
nodes.info: {}
- set:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public Stats(StreamInput in) throws IOException {
isThrottled = in.readBoolean();
throttleTimeInMillis = in.readLong();

if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_11_0)) {
docStatusStats = in.readOptionalWriteable(DocStatusStats::new);
} else {
docStatusStats = null;

Check warning on line 178 in server/src/main/java/org/opensearch/index/shard/IndexingStats.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/org/opensearch/index/shard/IndexingStats.java#L178

Added line #L178 was not covered by tests
Expand Down Expand Up @@ -308,7 +308,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeBoolean(isThrottled);
out.writeLong(throttleTimeInMillis);

if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_11_0)) {
out.writeOptionalWriteable(docStatusStats);
}
}
Expand Down

0 comments on commit ae8bde7

Please sign in to comment.