[server] Support altering auto partition num-precreate option#3434
Open
fhan688 wants to merge 1 commit into
Open
[server] Support altering auto partition num-precreate option#3434fhan688 wants to merge 1 commit into
fhan688 wants to merge 1 commit into
Conversation
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: #3351
This PR allows
table.auto-partition.num-precreateto be altered dynamically after table creation.Before this change, auto partition retention could be updated by
ALTER TABLE, buttable.auto-partition.num-precreatewas rejected by alter table validation. This PR enables users to increase or decrease the number of pre-created auto partitions without recreating the table.
Brief change log
table.auto-partition.num-precreateto alterable Fluss table options.AutoPartitionManagerwhen eithernum-retentionornum-precreatechanges.num-precreateis increased, missing future partitions are created after the table property change is observed.num-precreateis decreased, existing pre-created partitions are kept, and future auto partition runs stop over-creating partitions.num-precreate.ALTER TABLE SET/RESET ('table.auto-partition.num-precreate' ...).Tests
AutoPartitionManagerTest#testUpdateAutoPartitionNumPrecreateFlink120CatalogITCase#testAlterAutoPartitionNumPrecreategit diff --checkAPI and Format
This change does not modify RPC protocol, storage format, or serialized metadata format.
It expands the supported dynamic table property set by allowing
table.auto-partition.num-precreateto be changed throughALTER TABLE SETand reset throughALTER TABLE RESET.Documentation
Updated documentation:
website/docs/engine-flink/ddl.mdwebsite/docs/engine-flink/options.mdwebsite/docs/table-design/data-distribution/partitioning.md