keith-turner commented on code in PR #4712:
URL: https://github.com/apache/accumulo/pull/4712#discussion_r1676396743


##########
server/manager/src/main/java/org/apache/accumulo/manager/upgrade/Upgrader11to12.java:
##########
@@ -69,13 +69,22 @@ public class Upgrader11to12 implements Upgrader {
   static final Set<Text> UPGRADE_FAMILIES =
       Set.of(DataFileColumnFamily.NAME, CHOPPED, 
ExternalCompactionColumnFamily.NAME);
 
+  public static final String ZTRACERS = "/tracers";
+  public static final String ZCONF_LEGACY = "/conf";
+
   @Override
   public void upgradeZookeeper(@NonNull ServerContext context) {
     log.debug("Upgrade ZooKeeper: upgrading to data version {}", 
METADATA_FILE_JSON_ENCODING);
-    var rootBase = ZooUtil.getRoot(context.getInstanceID()) + ZROOT_TABLET;
+    var zooRoot = ZooUtil.getRoot(context.getInstanceID());
+    var rootBase = zooRoot + ZROOT_TABLET;
 
     try {
       var zrw = context.getZooReaderWriter();
+
+      // clean up nodes no longer in use
+      zrw.recursiveDelete(zooRoot + ZTRACERS, ZooUtil.NodeMissingPolicy.SKIP);
+      zrw.recursiveDelete(zooRoot + ZCONF_LEGACY, 
ZooUtil.NodeMissingPolicy.SKIP);

Review Comment:
   I looked into this a bit and do not think there is anything to actually 
remove in zookeeper.  Looking at 
[ConfigPropertyUpgrader](https://github.com/apache/accumulo/blob/0e7417d0369aca85e149563cc52ad7c9108dfe6d/server/base/src/main/java/org/apache/accumulo/server/conf/util/ConfigPropertyUpgrader.java)
 in 2.1 ZCONF_LEGACY is only used for table and namespace config AND the 
upgrade sets a boolean to remove those.



-- 
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]

Reply via email to