Repository navigation
[server] Support altering auto partition enabled option - #3453
Merged
luoyuxia merged 5 commits intoJun 12, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enables dynamic alteration of table.auto-partition.enabled for existing partitioned tables, updating coordinator/auto-partition scheduling behavior to correctly react to full auto-partition strategy changes.
Changes:
- Adds
table.auto-partition.enabledto the set of alterable table options. - Implements value-based
equals/hashCodeforAutoPartitionStrategyand updates coordinator handling to react to any strategy change (enable/disable/strategy refresh). - Adds server-side and Flink SQL integration tests covering alter-enabled behavior and scheduler correctness.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| fluss-server/src/test/java/org/apache/fluss/server/coordinator/AutoPartitionManagerTest.java | Adds a unit test verifying disable→enable transitions stop/resume partition creation as expected. |
| fluss-server/src/main/java/org/apache/fluss/server/coordinator/CoordinatorEventProcessor.java | Detects full auto-partition strategy changes and delegates to the new strategy-change handler. |
| fluss-server/src/main/java/org/apache/fluss/server/coordinator/AutoPartitionManager.java | Introduces handleAutoPartitionStrategyChange and skips stale scheduled tasks for removed tables. |
| fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/flink/catalog/FlinkCatalogITCase.java | Adds IT coverage for altering table.auto-partition.enabled and updates unsupported-alter expectations. |
| fluss-common/src/main/java/org/apache/fluss/utils/AutoPartitionStrategy.java | Adds equals/hashCode/toString to enable value-based change detection and clearer logging. |
| fluss-common/src/main/java/org/apache/fluss/config/FlussConfigUtils.java | Marks table.auto-partition.enabled as an alterable table option. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
please help review, thanks! @luoyuxia |
luoyuxia
approved these changes
Jun 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: #3353
Currently,
table.auto-partition.enabledcannot be altered after table creation, while related auto-partition options such astable.auto-partition.num-retentionalready support dynamic updates.This PR supports altering
table.auto-partition.enabledso users can enable or disable auto partitioning for an existing partitioned table without recreating the table.Brief change log
table.auto-partition.enabledto alterable table options.AutoPartitionStrategyso coordinator can detect full auto-partition strategy changes.AutoPartitionManager#handleAutoPartitionStrategyChangeto handle:table.auto-partition.enabled.Tests
AutoPartitionManagerTest#testUpdateAutoPartitionEnabledFlink120CatalogITCase#testAlterAutoPartitionEnabledFlink120CatalogITCase#testAlterAutoPartitionRetentionFlink120CatalogITCase#testAlterTableConfiggit diff --checkspotless:applyAPI and Format
No storage format or RPC format changes.
This changes user-visible table option behavior by making the existing
table.auto-partition.enabledoption alterable. No new Java public API is introduced.Documentation
No new table option is introduced. This PR only makes the existing
table.auto-partition.enabledoption dynamically alterable.