dlmarion commented on code in PR #5357: URL: https://github.com/apache/accumulo/pull/5357#discussion_r1971849004
########## server/manager/src/main/java/org/apache/accumulo/manager/upgrade/UpgradeProgressTracker.java: ########## @@ -0,0 +1,127 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.accumulo.manager.upgrade; + +import static java.nio.charset.StandardCharsets.UTF_8; +import static org.apache.accumulo.core.util.LazySingletons.GSON; + +import java.util.Objects; + +import org.apache.accumulo.core.Constants; +import org.apache.accumulo.core.fate.zookeeper.ZooReaderWriter; +import org.apache.accumulo.core.fate.zookeeper.ZooUtil.NodeExistsPolicy; +import org.apache.accumulo.core.fate.zookeeper.ZooUtil.NodeMissingPolicy; +import org.apache.accumulo.server.AccumuloDataVersion; +import org.apache.accumulo.server.ServerContext; +import org.apache.zookeeper.KeeperException; + +import com.google.common.base.Preconditions; + +public class UpgradeProgressTracker { + + public static class ComponentVersions { + private int zooKeeperVersion; + private int rootVersion; + private int metadataVersion; Review Comment: @ctubbsii - I think I like the "final target version" approach better. Using the example of upgrading from 2.1 (A) to 4.0 (C) with the "next target version" model I think you end up with following: zkVersion | zkTargetVersion | rootVersion | rootTargetVersion | metadataVersion | metadataTargetVersion --- | --- | --- | --- | --- | --- A | B | A | A | A | A B | C| A | A | A | A C | null | A | B | A | A C | null | B | C | A | A C | null | C | null | A | B C | null | C | null | B | C C | null | C | null | C | null I think the **only** place where you could start version B software (3.1 in this case) is after the first row where ZooKeeper has been upgraded from A to B. If the zooKeeper upgrade from B to C fails, then you may not be able to start version B software because ZooKeeper could have been modified. Also, we don't pause or stop the upgrade process in between Upgraders, so there is no real opportunity for a user to stop the upgrade at a specific point in time. -- 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]
