Skip to content

Commit bf81f69

Browse files
Fly-Styleactions-user
authored andcommitted
Fix Rolling Upgrade 5.0 -> 5.3 [HZ-4431] (#2388)
In Platform 5.2 we introduced [improvements for Kubernetes](https://github.com/hazelcast/hazelcast-mono/blob/master/docs/design/persistence/04-persistence-kubernetes-improvements.md). For some reason, during the upgrade from 5.1 -> 5.2 cluster being upgraded in `PASSIVE` state becomes `ACTIVE`, most probably, due to logic in `KubernetesTopologyIntentTracker`. Moreover, despite the fact all members were updated to 5.2, the **cluster version didn't change and still is 5.1.** During next upgrade 5.2 -> 5.3 inbound serialization stream holds version 5.1 for `MembersUpdateOp`, there is a new field introduced in `MemberInfo`, and the deserializer expects that `cpMemberUUID` is present in `MemberInfo` list, which doesn't happen in this circumstances. This patch fixes a serialization exception[1] during continuous (5.0 -> 5.3) Rolling Upgrade, and actually unblocks it. Still, RU is not perfect (with 5.2 members cluster still holds 5.1 version), but it is room for improvement in next cycles with more dedicated focus on this issue, if it will be prioritized. [1] - `HazelcastSerializationException: There is no suitable de-serializer for type -509` P.S, There are two JIRA issues for further investigation: - https://hazelcast.atlassian.net/browse/ESC-33 - https://hazelcast.atlassian.net/browse/HZ-4809 GitOrigin-RevId: 64d6eb662d85865b52b7804799d4d691768c8dd0
1 parent f6ded3d commit bf81f69

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

hazelcast/src/main/java/com/hazelcast/internal/cluster/MemberInfo.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ public void readData(ObjectDataInput in) throws IOException {
157157
version = in.readObject();
158158
memberListJoinVersion = in.readInt();
159159
addressMap = readMap(in);
160-
cpMemberUUID = UUIDSerializationUtil.readUUID(in);
160+
if (in.getVersion().isGreaterOrEqual(Versions.V5_2)) {
161+
cpMemberUUID = UUIDSerializationUtil.readUUID(in);
162+
}
161163
}
162164

163165
@Override
@@ -175,7 +177,9 @@ public void writeData(ObjectDataOutput out) throws IOException {
175177
out.writeObject(version);
176178
out.writeInt(memberListJoinVersion);
177179
writeMap(addressMap, out);
178-
UUIDSerializationUtil.writeUUID(out, cpMemberUUID);
180+
if (out.getVersion().isGreaterOrEqual(Versions.V5_2)) {
181+
UUIDSerializationUtil.writeUUID(out, cpMemberUUID);
182+
}
179183
}
180184

181185
@Override

0 commit comments

Comments
 (0)