Skip to content

Commit

Permalink
Fixing SearchStats (de)serialization (caused by #4616)
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
  • Loading branch information
reta committed Oct 6, 2022
1 parent 563122e commit bfe21e0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [Bug]: Alias filter lost after rollover ([#4499](https://github.com/opensearch-project/OpenSearch/pull/4499))
- Attempt to fix Github workflow for Gradle Check job ([#4679](https://github.com/opensearch-project/OpenSearch/pull/4679))
- Fix flaky DecommissionControllerTests.testTimesOut ([4683](https://github.com/opensearch-project/OpenSearch/pull/4683))
- Fixing SearchStats (de)serialization (caused by https://github.com/opensearch-project/OpenSearch/pull/4616) ([#4697](https://github.com/opensearch-project/OpenSearch/pull/4697))

### Security

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
"Help":
- skip:
version: " - 2.9.99"
reason: point in time stats were added in 3.0.0
version: " - 2.3.99"
reason: point in time stats were added in 2.4.0
features: node_selector
- do:
cat.shards:
help: true
node_selector:
version: "3.0.0 - "
version: "2.4.0 - "

- match:
$body: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"Create PIT, Search with PIT ID and Delete":
- skip:
version: " - 2.9.99"
reason: "mode to be introduced later than 3.0"
version: " - 2.3.99"
reason: "mode to be introduced later than 2.4.0"
- do:
indices.create:
index: test_pit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private Stats(StreamInput in) throws IOException {
suggestTimeInMillis = in.readVLong();
suggestCurrent = in.readVLong();

if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_4_0)) {
pitCount = in.readVLong();
pitTimeInMillis = in.readVLong();
pitCurrent = in.readVLong();
Expand Down Expand Up @@ -292,7 +292,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeVLong(suggestTimeInMillis);
out.writeVLong(suggestCurrent);

if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_4_0)) {
out.writeVLong(pitCount);
out.writeVLong(pitTimeInMillis);
out.writeVLong(pitCurrent);
Expand Down

0 comments on commit bfe21e0

Please sign in to comment.