keith-turner commented on code in PR #5749: URL: https://github.com/apache/accumulo/pull/5749#discussion_r2241317505
########## server/base/src/main/java/org/apache/accumulo/server/init/ZooKeeperInitializer.java: ########## @@ -76,16 +77,33 @@ void initializeConfig(final InstanceId instanceId, final ZooReaderWriter zoo) { String zkInstanceRoot = ZooUtil.getRoot(instanceId); zoo.putPersistentData(zkInstanceRoot, EMPTY_BYTE_ARRAY, ZooUtil.NodeExistsPolicy.SKIP); var sysPropPath = SystemPropKey.of().getPath(); - VersionedProperties vProps = new VersionedProperties(); // skip if the encoded props node exists - if (zoo.exists(sysPropPath)) { + boolean alreadyExists = zoo.exists(zkInstanceRoot + sysPropPath); + var created = zoo.putPrivatePersistentData(zkInstanceRoot + sysPropPath, + VersionedPropCodec.getDefault().toBytes(new VersionedProperties()), + ZooUtil.NodeExistsPolicy.FAIL); + if (!alreadyExists && !created) { + throw new IllegalStateException( + "Failed to create default system props during initialization at: " + sysPropPath); + } + Review Comment: Oh interesting about the chroot stuff, that definitely makes a big diff. That throws a wrench in attempting to reuse code. -- 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: notifications-unsubscr...@accumulo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org