Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ public static int get() {
}

// ELASTICITY_TODO get upgrade working
// public static final Set<Integer> CAN_RUN = Set.of(ROOT_TABLET_META_CHANGES, CURRENT_VERSION);
// public static final Set<Integer> CAN_RUN = Set.of(ROOT_TABLET_META_CHANGES,
// REMOVE_DEPRECATIONS_FOR_VERSION_3, METADATA_FILE_JSON_ENCODING, CURRENT_VERSION);
public static final Set<Integer> CAN_RUN = Set.of(CURRENT_VERSION);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,9 @@ public void testSasl() throws Exception {
// ensure upgrades fail with older, unsupported versions, but pass with supported versions
@Test
public void testCanRun() {
// 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.ONDEMAND_TABLETS_FOR_VERSION_4;
// ELASTICITY_TODO basically disable check until upgrade to 3.1 is supported. Should be:
// final int oldestSupported = AccumuloDataVersion.oldestUpgradeableVersion();
final int oldestSupported = AccumuloDataVersion.oldestUpgradeableVersion();
// ELASTICITY_TODO basically disable check until upgrade is working. Should be:
// assertEquals(10, oldestSupported); // make sure it hasn't changed accidentally

final int currentVersion = AccumuloDataVersion.get();
IntConsumer shouldPass = ServerContext::ensureDataVersionCompatible;
IntConsumer shouldFail = v -> assertThrows(IllegalStateException.class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
package org.apache.accumulo.manager.upgrade;

import static org.apache.accumulo.server.AccumuloDataVersion.METADATA_FILE_JSON_ENCODING;
import static org.apache.accumulo.server.AccumuloDataVersion.REMOVE_DEPRECATIONS_FOR_VERSION_3;
import static org.apache.accumulo.server.AccumuloDataVersion.ROOT_TABLET_META_CHANGES;

import java.io.IOException;
Expand Down Expand Up @@ -112,8 +114,10 @@ public boolean isParentLevelUpgraded(Ample.DataLevel level) {
private int currentVersion;
// map of "current version" -> upgrader to next version.
// Sorted so upgrades execute in order from the oldest supported data version to current
private final Map<Integer,Upgrader> upgraders = Collections
.unmodifiableMap(new TreeMap<>(Map.of(ROOT_TABLET_META_CHANGES, new Upgrader10to11())));
private final Map<Integer,
Upgrader> upgraders = Collections.unmodifiableMap(new TreeMap<>(
Map.of(ROOT_TABLET_META_CHANGES, new Upgrader10to11(), REMOVE_DEPRECATIONS_FOR_VERSION_3,
new Upgrader11to12(), METADATA_FILE_JSON_ENCODING, new Upgrader12to13())));

private volatile UpgradeStatus status;

Expand Down