Fix TaskInfo serialization and unmute task_list bwc test (#2766)
Fixes the version check around resourceStats serialization and unmutes the failing bwc test. Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
This commit is contained in:
parent
21f9950806
commit
406ee36b15
|
@ -1,8 +1,6 @@
|
|||
---
|
||||
"tasks_list test":
|
||||
- skip:
|
||||
version: "all"
|
||||
reason: "AwaitsFix https://github.com/opensearch-project/OpenSearch/issues/2757"
|
||||
features: [arbitrary_key]
|
||||
|
||||
- do:
|
||||
|
|
|
@ -142,7 +142,7 @@ public final class TaskInfo implements Writeable, ToXContentFragment {
|
|||
}
|
||||
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;
|
||||
|
@ -164,7 +164,7 @@ public final class TaskInfo implements Writeable, ToXContentFragment {
|
|||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue