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

Fix TaskInfo serialization and unmute task_list bwc test #2766

Merged
merged 1 commit into from
Apr 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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,8 +1,6 @@
---
"tasks_list test":
- skip:
version: "all"
reason: "AwaitsFix https://github.com/opensearch-project/OpenSearch/issues/2757"
features: [arbitrary_key]

- do:
Expand Down
4 changes: 2 additions & 2 deletions server/src/main/java/org/opensearch/tasks/TaskInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public TaskInfo(StreamInput in) throws IOException {
}
parentTaskId = TaskId.readFromStream(in);
headers = in.readMap(StreamInput::readString, StreamInput::readString);
if (in.getVersion().onOrAfter(Version.V_2_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_1_0)) {
resourceStats = in.readOptionalWriteable(TaskResourceStats::new);
} else {
resourceStats = null;
Expand All @@ -164,7 +164,7 @@ public void writeTo(StreamOutput out) throws IOException {
}
parentTaskId.writeTo(out);
out.writeMap(headers, StreamOutput::writeString, StreamOutput::writeString);
if (out.getVersion().onOrAfter(Version.V_2_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_1_0)) {
out.writeOptionalWriteable(resourceStats);
}
}
Expand Down