Skip to content

Commit 00e7cba

Browse files
authored
[hotfix] Fix KeeperException$NodeExistsException (#1023)
1 parent 2d59a49 commit 00e7cba

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

fluss-server/src/main/java/com/alibaba/fluss/server/coordinator/MetadataManager.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,13 @@ public void createPartition(
419419
zookeeperClient.registerPartition(tablePath, tableId, partitionName, partitionId);
420420
LOG.info(
421421
"Register partition {} to zookeeper for table [{}].", partitionName, tablePath);
422+
} catch (KeeperException.NodeExistsException nodeExistsException) {
423+
if (!ignoreIfExists) {
424+
throw new PartitionAlreadyExistsException(
425+
String.format(
426+
"Partition '%s' already exists for table %s",
427+
partition.getPartitionQualifiedName(), tablePath));
428+
}
422429
} catch (Exception e) {
423430
throw new FlussRuntimeException(
424431
String.format(

0 commit comments

Comments
 (0)