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":
|
"tasks_list test":
|
||||||
- skip:
|
- skip:
|
||||||
version: "all"
|
|
||||||
reason: "AwaitsFix https://github.com/opensearch-project/OpenSearch/issues/2757"
|
|
||||||
features: [arbitrary_key]
|
features: [arbitrary_key]
|
||||||
|
|
||||||
- do:
|
- do:
|
||||||
|
|
|
@ -142,7 +142,7 @@ public final class TaskInfo implements Writeable, ToXContentFragment {
|
||||||
}
|
}
|
||||||
parentTaskId = TaskId.readFromStream(in);
|
parentTaskId = TaskId.readFromStream(in);
|
||||||
headers = in.readMap(StreamInput::readString, StreamInput::readString);
|
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);
|
resourceStats = in.readOptionalWriteable(TaskResourceStats::new);
|
||||||
} else {
|
} else {
|
||||||
resourceStats = null;
|
resourceStats = null;
|
||||||
|
@ -164,7 +164,7 @@ public final class TaskInfo implements Writeable, ToXContentFragment {
|
||||||
}
|
}
|
||||||
parentTaskId.writeTo(out);
|
parentTaskId.writeTo(out);
|
||||||
out.writeMap(headers, StreamOutput::writeString, StreamOutput::writeString);
|
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);
|
out.writeOptionalWriteable(resourceStats);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue