JingsongLi commented on code in PR #10156: URL: https://github.com/apache/paimon/pull/10156#discussion_r4283820546
########## paimon-core/src/main/java/org/apache/paimon/zookeeper/ZooKeeperCatalogLockOptions.java: ########## @@ -0,0 +1,73 @@ +/* + * 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 + * + * http://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.paimon.zookeeper; + +import org.apache.paimon.options.ConfigOption; +import org.apache.paimon.options.ConfigOptions; + +import java.time.Duration; + +/** ZooKeeper catalog lock options. */ +public final class ZooKeeperCatalogLockOptions { + + private ZooKeeperCatalogLockOptions() {} + + public static final ConfigOption<String> QUORUM = + ConfigOptions.key("lock.zookeeper.quorum") + .stringType() + .noDefaultValue() + .withDescription( + "ZooKeeper connect string, e.g. 'host1:2181,host2:2181'. Required."); + + public static final ConfigOption<Duration> SESSION_TIMEOUT = + ConfigOptions.key("lock.zookeeper.session-timeout") + .durationType() + .defaultValue(Duration.ofSeconds(30)) + .withDescription("ZooKeeper session timeout."); + + public static final ConfigOption<Duration> LOCK_ACQUIRE_TIMEOUT = + ConfigOptions.key("lock-acquire-timeout") + .durationType() + .defaultValue(Duration.ofMinutes(8)) + .withDescription("Maximum time to wait for acquiring the ZooKeeper lock."); Review Comment: [P2] Keep the shared lock-acquire-timeout definition consistent This introduces the existing JDBC key lock-acquire-timeout with the same type/default but a different description. ConfigOptionsDocsCompletenessITCase explicitly rejects distinct definitions of one key, so both current-head Core CI jobs fail with "Ambiguous option lock-acquire-timeout due to distinct descriptions (JdbcCatalogOptions vs ZooKeeperCatalogLockOptions)." This is a deterministic failure in the required integration checks, not a dependency-download problem. Please use the existing generic description (or a shared ConfigOption definition) and update the generated ZooKeeper configuration HTML consistently. The default can remain eight minutes. -- 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]
