Adjust transport compatibility logic following backport of #26166

This commit is contained in:
David Roberts 2017-10-03 14:11:49 +01:00
parent b33c444db5
commit ea7be2d527
1 changed files with 2 additions and 4 deletions

View File

@ -419,8 +419,7 @@ public class OsStats implements Writeable, ToXContentFragment {
cpuCfsPeriodMicros = in.readLong();
cpuCfsQuotaMicros = in.readLong();
cpuStat = new CpuStat(in);
// TODO: change this to 6.1.0 after backporting
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (in.getVersion().onOrAfter(Version.V_6_1_0)) {
memoryControlGroup = in.readOptionalString();
memoryLimitInBytes = in.readOptionalString();
memoryUsageInBytes = in.readOptionalString();
@ -439,8 +438,7 @@ public class OsStats implements Writeable, ToXContentFragment {
out.writeLong(cpuCfsPeriodMicros);
out.writeLong(cpuCfsQuotaMicros);
cpuStat.writeTo(out);
// TODO: change this to 6.1.0 after backporting
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (out.getVersion().onOrAfter(Version.V_6_1_0)) {
out.writeOptionalString(memoryControlGroup);
out.writeOptionalString(memoryLimitInBytes);
out.writeOptionalString(memoryUsageInBytes);