This is an automated email from the ASF dual-hosted git repository. edcoleman pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push: new d59e2ebd3e New data version to support no-chop changes, disable upgrade (#3779) d59e2ebd3e is described below commit d59e2ebd3e17130f1f7f2eeae2800daeefc90e3d Author: EdColeman <d...@etcoleman.com> AuthorDate: Wed Sep 27 16:25:55 2023 -0400 New data version to support no-chop changes, disable upgrade (#3779) * New data version to support no-chop changes, temporarily disable upgrades Co-authored-by: Christopher Tubbs <ctubb...@apache.org> --- .../org/apache/accumulo/server/AccumuloDataVersion.java | 15 +++++++++++++-- .../org/apache/accumulo/server/ServerContextTest.java | 5 ++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/server/base/src/main/java/org/apache/accumulo/server/AccumuloDataVersion.java b/server/base/src/main/java/org/apache/accumulo/server/AccumuloDataVersion.java index 5b44913f11..7c547dcb4e 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/AccumuloDataVersion.java +++ b/server/base/src/main/java/org/apache/accumulo/server/AccumuloDataVersion.java @@ -36,6 +36,12 @@ import java.util.Set; */ public class AccumuloDataVersion { + /** + * version (12) reflect changes to support no chop merges including json encoding of the file + * column family stored in root and metadata tables. + */ + public static final int METADATA_FILE_JSON_ENCODING = 12; + /** * version (11) reflects removal of replication starting with 3.0 */ @@ -59,7 +65,7 @@ public class AccumuloDataVersion { * <li>version (4) moves logging to HDFS in 1.5.0 * </ul> */ - private static final int CURRENT_VERSION = REMOVE_DEPRECATIONS_FOR_VERSION_3; + private static final int CURRENT_VERSION = METADATA_FILE_JSON_ENCODING; /** * Get the current Accumulo Data Version. See Javadoc of static final integers for a detailed @@ -71,7 +77,10 @@ public class AccumuloDataVersion { return CURRENT_VERSION; } - public static final Set<Integer> CAN_RUN = Set.of(ROOT_TABLET_META_CHANGES, CURRENT_VERSION); + // TODO - this disables upgrades until https://github.com/apache/accumulo/issues/3768 is done + // public static final Set<Integer> CAN_RUN = Set.of(ROOT_TABLET_META_CHANGES, + // REMOVE_DEPRECATIONS_FOR_VERSION_3, CURRENT_VERSION); + public static final Set<Integer> CAN_RUN = Set.of(CURRENT_VERSION); /** * Get the stored, current working version. @@ -96,6 +105,8 @@ public class AccumuloDataVersion { return "2.1.0"; case REMOVE_DEPRECATIONS_FOR_VERSION_3: return "3.0.0"; + case METADATA_FILE_JSON_ENCODING: + return "3.1.0"; } throw new IllegalArgumentException("Unsupported data version " + version); } diff --git a/server/base/src/test/java/org/apache/accumulo/server/ServerContextTest.java b/server/base/src/test/java/org/apache/accumulo/server/ServerContextTest.java index f01145a5b0..fbce43443d 100644 --- a/server/base/src/test/java/org/apache/accumulo/server/ServerContextTest.java +++ b/server/base/src/test/java/org/apache/accumulo/server/ServerContextTest.java @@ -135,7 +135,10 @@ public class ServerContextTest { // ensure this fails with older versions; the oldest supported version is hard-coded here // to ensure we don't unintentionally break upgrade support; changing this should be a conscious // decision and this check will ensure we don't overlook it - final int oldestSupported = AccumuloDataVersion.ROOT_TABLET_META_CHANGES; + + // TODO basically disable check until upgrade to 3.1 is supported. Should be: + // final int oldestSupported = AccumuloDataVersion.ROOT_TABLET_META_CHANGES; + final int oldestSupported = AccumuloDataVersion.METADATA_FILE_JSON_ENCODING; final int currentVersion = AccumuloDataVersion.get(); IntConsumer shouldPass = ServerContext::ensureDataVersionCompatible; IntConsumer shouldFail = v -> assertThrows(IllegalStateException.class,