EdColeman commented on code in PR #3160:
URL: https://github.com/apache/accumulo/pull/3160#discussion_r1087286437
##########
server/manager/src/main/java/org/apache/accumulo/manager/upgrade/UpgradeCoordinator.java:
##########
@@ -142,11 +140,14 @@ public synchronized void upgradeZookeeper(ServerContext
context,
"Not currently in a suitable state to do zookeeper upgrade %s",
status);
try {
- int cv = context.getServerDirs()
- .getAccumuloPersistentVersion(context.getVolumeManager().getFirst());
- ServerContext.ensureDataVersionCompatible(cv);
+ int cv = AccumuloDataVersion.getCurrentVersion(context);
this.currentVersion = cv;
+ if (cv < AccumuloDataVersion.ROOT_TABLET_META_CHANGES) {
+ throw new UnsupportedOperationException(
+ "Upgrading from a version before 2.1 is not supported. Upgrade to
2.1 before upgrading to 3.x");
+ }
+
Review Comment:
Previously it was checked in each upgrader - the check here fails faster and
provided a clearer message than if the upgradeder fail the version checks -
failing with a message that upgrader for data version X is accurate, but may
not translate to the user how data versions and Accumulo versions correlate.
On the positive side - this provides a clear user message at the expense of
needing to change the message if upgrades change - but that should be rare and
I favored a better user experience.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]