keith-turner commented on code in PR #5888:
URL: https://github.com/apache/accumulo/pull/5888#discussion_r2356280281
##########
server/base/src/main/java/org/apache/accumulo/server/util/UpgradeUtil.java:
##########
@@ -85,6 +120,20 @@ public void execute(String[] args) throws Exception {
ZooReaderWriter zoo = new ZooReaderWriter(siteConf);
if (opts.prepare) {
+ SortedMap<String,String> tablePropsInSite = new TreeMap<>();
+ // get table props in site conf excluding default config
+ siteConf.getProperties(tablePropsInSite,
+ key -> key.startsWith(Property.TABLE_PREFIX.getKey()), false);
+
+ if (!tablePropsInSite.isEmpty()) {
+ LOG.warn("Saw table properties in site configuration : {} ",
tablePropsInSite.keySet());
+ throw new IllegalStateException("Did not start upgrade preparation
because table properties"
Review Comment:
> User could be upgrading to 3.0 or 3.1 in which case we shouldn't fail.
Interesting, was not thinking about 3.x . I suppose if someone were
upgrading from 2.1 to 3.0 then they would not want to run upgrade prepare. We
could add the expected version to the prepare command like `accumulo upgrade
--prepare 3.0` to deal w/ this and it could be a noop, but not sure that is
worthwhile just for 3.0.
> https://github.com/apache/accumulo/issues/5481 is for backporting upgrade
--prepare to a 3.1 release. Failing there may be more appropriate.
Someone could go directly from 2.1 to 4.0 though. In this case it seems
like handling the table props in 2.1 is the best way to minimize downtime. Was
trying to get that across.
Maybe we could log a warning in the 2.1 code instead of failing and add a
`accumulo upgrade --unprepare` that would undo what prepare did and make it
easy for a user to start 2.1 back up to deal w/ the table props. The warning
could suggest running unprepare as an option.
--
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]