add comments to KylinVersion
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/8ed3fbc3 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/8ed3fbc3 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/8ed3fbc3 Branch: refs/heads/master Commit: 8ed3fbc353965da9df7f18f53e84f0515200708e Parents: 07d8921 Author: Hongbin Ma <mahong...@apache.org> Authored: Mon Nov 14 17:40:33 2016 +0800 Committer: Hongbin Ma <mahong...@apache.org> Committed: Mon Nov 14 18:27:25 2016 +0800 ---------------------------------------------------------------------- .../main/java/org/apache/kylin/common/KylinVersion.java | 11 +++++++++++ 1 file changed, 11 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/8ed3fbc3/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java ---------------------------------------------------------------------- diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java b/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java index 0e4147a..b7c3804 100644 --- a/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java +++ b/core-common/src/main/java/org/apache/kylin/common/KylinVersion.java @@ -73,6 +73,17 @@ public class KylinVersion { private static final Set<KylinVersion> SIGNATURE_INCOMPATIBLE_REVISIONS = new HashSet<KylinVersion>(); + /** + * 1.5.1 is actually compatible with 1.5.0's cube. However the "calculate signature" method in 1.5.1 code base somehow + * gives different signature values for 1.5.0 cubes. To prevent from users having to take care of this mess, as people + * usually won't expect to take lots of efforts for small upgrade (from 1.5.0 to 1.5.1), a special list of + * SIGNATURE_INCOMPATIBLE_REVISIONS is introduced to silently take care of such legacy cubes. + * + * We should NEVER add new stuff to SIGNATURE_INCOMPATIBLE_REVISIONS. "calculate signature" should always return consistent values + * to compatible versions. If it's impossible to maintain consistent signatures between upgrade, we should increase the minor version, + * e.g. it's better to skip 1.5.1 and use 1.6.0 as the next release version to 1.5.0, or even to use 2.0.0, as people tends to accept + * doing more (e.g. Having to use sth like a metastore upgrade tool when upgrading Kylin) + */ static { SIGNATURE_INCOMPATIBLE_REVISIONS.add(new KylinVersion("1.5.1")); }