Skip to content

Commit

Permalink
[Search latency - Coordinator] Changing version check to 2.11 (opense…
Browse files Browse the repository at this point in the history
…arch-project#10280)

* [Search latency - Coordinator] Changing version check to 2.11

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>

* [Port main] update version check as per v2.11.0

[Backport 2.x] Indexing: add Doc status counter (opensearch-project#10267)

* Indexing: add Doc Status Counter (opensearch-project#8716)

Currently, Opensearch returns a 200 OK response code for a Bulk API
call, even though there can be partial/complete failures within the
request E2E. This provides doc level stats with respect to the rest status code as 2xx, 4xx, 5xx etc.

Signed-off-by: Rohit Ashiwal <rashiwal@amazon.com>
(cherry picked from commit d656e3d)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 94173e3)
Signed-off-by: Rohit Ashiwal <rashiwal@amazon.com>
Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>

---------

Signed-off-by: Sagar Upadhyaya <sagar.upadhyaya.121@gmail.com>
Signed-off-by: Rohit Ashiwal <rashiwal@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
sgup432 authored and rayshrey committed Oct 3, 2023
1 parent bd17d8d commit af8790b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 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 @@ -242,7 +242,7 @@ private Stats(StreamInput in) throws IOException {
pitCurrent = in.readVLong();
}

if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_11_0)) {
this.requestStatsLongHolder = new RequestStatsLongHolder();
requestStatsLongHolder.requestStatsHolder = in.readMap(StreamInput::readString, PhaseStatsLongHolder::new);
}
Expand Down Expand Up @@ -437,7 +437,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeVLong(pitCurrent);
}

if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_11_0)) {
if (requestStatsLongHolder == null) {
requestStatsLongHolder = new RequestStatsLongHolder();
}
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;
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 af8790b

Please sign in to comment.