You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched in the issues and found nothing similar.
Description
The suggested implementation steps:
Introduce a cluster level config: max.partition.num: Limits the maximum number of partitions that can be created for a partitioned table to avoid creating too many partitions. Default 1000?
Add TooManyPartitionsException in com.alibaba.fluss.exception which is an ApiException, and register to com.alibaba.fluss.rpc.protocol.Errors.
Add the method getPartitionNumber(TablePath tablePath) in ZooKeeperClient. The implementation should use zkClient.checkExists().forPath(path) to get numChildren from org.apache.zookeeper.data.Stat, instead of listing all children.
Checks the current partition number of this table is not exceed the configured max number in com.alibaba.fluss.server.coordinator.MetadataManager#createPartition. Otherwise, throws TooManyPartitionsException.
com.alibaba.fluss.server.coordinator.AutoPartitionManager#createPartitions should catch TooManyPartitionsException to log warning.
Add tests in FlussAdminITCase to verify the expected exception when create too many partitions.
Add tests in AutoPartitionManagerTest to verify new partitions will not created if it reaches max number of partitions.
Activity
caozhen1937 commentedon Mar 31, 2025
Hi @wuchong ,I submited a PR #693 , please review it feel free.