Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.x] [Point in time] Backport point in time changes #4616

Merged
merged 14 commits into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.2.99"
reason: "mode to be introduced later than 2.3"
- do:
indices.create:
index: test_pit
Expand Down Expand Up @@ -90,8 +90,8 @@
---
"Delete all":
- skip:
version: " - 2.9.99"
reason: "mode to be introduced later than 3.0"
version: " - 2.2.99"
reason: "mode to be introduced later than 2.3"
- 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_3_0)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the only place we are doing serde and relying on versioning?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And in rest high level tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_3_0)) {
out.writeVLong(pitCount);
out.writeVLong(pitTimeInMillis);
out.writeVLong(pitCurrent);
Expand Down