Skip to content

Commit 73ac0cc

Browse files
committed
Bug 36796618 - [36776743->24.03.1] Fix stream corruption error on rolling upgrade from 23.09 to any CE version
[git-p4: depot-paths = "//dev/coherence-ce/release/coherence-ce-v24.03/": change = 110020]
1 parent d074bfd commit 73ac0cc

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

prj/coherence-core-components/src/main/java/com/tangosol/coherence/component/net/management/model/localModel/StorageManagerModel.java

+6-8
Original file line numberDiff line numberDiff line change
@@ -736,10 +736,9 @@ public void readExternal(java.io.DataInput in)
736736
}
737737

738738
// added in 14.1.2.0.0 / 26.06.7 / 23.09.1
739-
if ((ExternalizableHelper.isVersionCompatible(in, VersionHelper.VERSION_14_1_2_0)
740-
&& !ExternalizableHelper.isVersionCompatible(in, VersionHelper.VERSION_23_09)) // exclude reading from 23.09 as it doesn't contain the attribute
741-
|| ExternalizableHelper.isPatchCompatible(in, VersionHelper.VERSION_14_1_1_2206_7)
742-
|| ExternalizableHelper.isPatchCompatible(in, VersionHelper.VERSION_23_09_1))
739+
if (ExternalizableHelper.isVersionCompatible(in, VersionHelper.VERSION_23_09_1)
740+
|| ExternalizableHelper.isPatchCompatible(in, VersionHelper.VERSION_14_1_2_0)
741+
|| ExternalizableHelper.isPatchCompatible(in, VersionHelper.VERSION_14_1_1_2206_7))
743742
{
744743
mapSnapshot.put("ClearCount", ExternalizableHelper.readLong(in));
745744
}
@@ -935,10 +934,9 @@ public void writeExternal(java.io.DataOutput out)
935934
}
936935

937936
// added in 14.1.2.0.0 / 22.06.7 / 23.09.1
938-
if ((ExternalizableHelper.isVersionCompatible(out, VersionHelper.VERSION_14_1_2_0)
939-
&& !ExternalizableHelper.isVersionCompatible(out, VersionHelper.VERSION_23_09)) // exclude writing to 23.09 as it doesn't contain the attribute
940-
|| ExternalizableHelper.isPatchCompatible(out, VersionHelper.VERSION_14_1_1_2206_7)
941-
|| ExternalizableHelper.isPatchCompatible(out, VersionHelper.VERSION_23_09_1))
937+
if (ExternalizableHelper.isVersionCompatible(out, VersionHelper.VERSION_23_09_1)
938+
|| ExternalizableHelper.isPatchCompatible(out, VersionHelper.VERSION_14_1_2_0)
939+
|| ExternalizableHelper.isPatchCompatible(out, VersionHelper.VERSION_14_1_1_2206_7))
942940
{
943941
ExternalizableHelper.writeLong(out, getClearCount());
944942
}

prj/coherence-core/src/main/java/com/tangosol/internal/util/DistributedAsyncNamedCache.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2023, Oracle and/or its affiliates.
2+
* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
33
*
44
* Licensed under the Universal Permissive License v 1.0 as shown at
55
* https://oss.oracle.com/licenses/upl.
@@ -31,6 +31,7 @@
3131
import java.util.function.IntPredicate;
3232

3333
import static com.tangosol.internal.util.VersionHelper.VERSION_14_1_1_2206_6;
34+
import static com.tangosol.internal.util.VersionHelper.VERSION_14_1_2_0;
3435
import static com.tangosol.internal.util.VersionHelper.VERSION_23_09;
3536
import static com.tangosol.internal.util.VersionHelper.isPatchCompatible;
3637
import static com.tangosol.internal.util.VersionHelper.isVersionCompatible;
@@ -277,8 +278,9 @@ protected boolean isBinaryProcessorCompatible()
277278
*/
278279
protected static boolean isBinaryProcessorCompatible(int nVersion)
279280
{
280-
// >= 23.09.0 or >= 14.1.1.2206.6 ok
281+
// >= 23.09.0 or >= 14.1.1.2206.6 or >= 14.1.2
281282
return isVersionCompatible(VERSION_23_09, nVersion)
283+
|| isPatchCompatible(VERSION_14_1_2_0, nVersion)
282284
|| isPatchCompatible(VERSION_14_1_1_2206_6, nVersion);
283285
}
284286

prj/coherence-core/src/main/java/com/tangosol/internal/util/VersionHelper.java

+4
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ public static int getVersionPrefix(int nYear, int nMonth)
8484
{
8585
return encodeVersion(15, 0, 0, 0, 0);
8686
}
87+
else if (nYear == 23)
88+
{
89+
return encodeVersion(14, 1, 2, 0, 0);
90+
}
8791
return encodeVersion(14, 1, 1, 0, 0);
8892
}
8993

prj/test/unit/coherence-core-tests/src/test/java/com/tangosol/net/memberset/VersioningTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022, Oracle and/or its affiliates.
2+
* Copyright (c) 2022, 2024 Oracle and/or its affiliates.
33
*
44
* Licensed under the Universal Permissive License v 1.0 as shown at
55
* https://oss.oracle.com/licenses/upl.
@@ -95,7 +95,7 @@ public void testCOH26149()
9595

9696
// if year is 23 or greater, then 03 will be encoded
9797
nFeaturePack = ServiceMemberSet.encodeVersion(23, 3, 0);
98-
assertThat(toVersionString(nFeaturePack), is("14.1.1.2303.0"));
98+
assertThat(toVersionString(nFeaturePack), is("14.1.2.2303.0"));
9999

100100
// if year is 21 or less 06 and 12 will be encoded
101101
nFeaturePack = ServiceMemberSet.encodeVersion(21, 12, 0);

0 commit comments

Comments
 (0)