mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-25 14:26:27 +00:00
Read m_m_n from cluster states from 6.7
This completes the BWC serialisation changes required for a 6.7 master to inform other nodes of the node-level value of the `minimum_master_nodes` setting. Relates #37701, #37811
This commit is contained in:
parent
0e36adc35f
commit
187b233571
@ -804,7 +804,7 @@ public class ClusterState implements ToXContentFragment, Diffable<ClusterState>
|
|||||||
Custom customIndexMetaData = in.readNamedWriteable(Custom.class);
|
Custom customIndexMetaData = in.readNamedWriteable(Custom.class);
|
||||||
builder.putCustom(customIndexMetaData.getWriteableName(), customIndexMetaData);
|
builder.putCustom(customIndexMetaData.getWriteableName(), customIndexMetaData);
|
||||||
}
|
}
|
||||||
builder.minimumMasterNodesOnPublishingMaster = in.getVersion().onOrAfter(Version.V_7_0_0) ? in.readVInt() : -1;
|
builder.minimumMasterNodesOnPublishingMaster = in.getVersion().onOrAfter(Version.V_6_7_0) ? in.readVInt() : -1;
|
||||||
return builder.build();
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -830,7 +830,7 @@ public class ClusterState implements ToXContentFragment, Diffable<ClusterState>
|
|||||||
out.writeNamedWriteable(cursor.value);
|
out.writeNamedWriteable(cursor.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (out.getVersion().onOrAfter(Version.V_7_0_0)) {
|
if (out.getVersion().onOrAfter(Version.V_6_7_0)) {
|
||||||
out.writeVInt(minimumMasterNodesOnPublishingMaster);
|
out.writeVInt(minimumMasterNodesOnPublishingMaster);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -880,7 +880,7 @@ public class ClusterState implements ToXContentFragment, Diffable<ClusterState>
|
|||||||
metaData = MetaData.readDiffFrom(in);
|
metaData = MetaData.readDiffFrom(in);
|
||||||
blocks = ClusterBlocks.readDiffFrom(in);
|
blocks = ClusterBlocks.readDiffFrom(in);
|
||||||
customs = DiffableUtils.readImmutableOpenMapDiff(in, DiffableUtils.getStringKeySerializer(), CUSTOM_VALUE_SERIALIZER);
|
customs = DiffableUtils.readImmutableOpenMapDiff(in, DiffableUtils.getStringKeySerializer(), CUSTOM_VALUE_SERIALIZER);
|
||||||
minimumMasterNodesOnPublishingMaster = in.getVersion().onOrAfter(Version.V_7_0_0) ? in.readVInt() : -1;
|
minimumMasterNodesOnPublishingMaster = in.getVersion().onOrAfter(Version.V_6_7_0) ? in.readVInt() : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -894,7 +894,7 @@ public class ClusterState implements ToXContentFragment, Diffable<ClusterState>
|
|||||||
metaData.writeTo(out);
|
metaData.writeTo(out);
|
||||||
blocks.writeTo(out);
|
blocks.writeTo(out);
|
||||||
customs.writeTo(out);
|
customs.writeTo(out);
|
||||||
if (out.getVersion().onOrAfter(Version.V_7_0_0)) {
|
if (out.getVersion().onOrAfter(Version.V_6_7_0)) {
|
||||||
out.writeVInt(minimumMasterNodesOnPublishingMaster);
|
out.writeVInt(minimumMasterNodesOnPublishingMaster);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user