Skip to content

[server] Support altering auto partition num-precreate option#3434

Open
fhan688 wants to merge 1 commit into
apache:mainfrom
fhan688:Support-altering-auto-partition-precreate-option
Open

[server] Support altering auto partition num-precreate option#3434
fhan688 wants to merge 1 commit into
apache:mainfrom
fhan688:Support-altering-auto-partition-precreate-option

Conversation

@fhan688
Copy link
Copy Markdown
Contributor

@fhan688 fhan688 commented Jun 5, 2026

Purpose

Linked issue: #3351

This PR allows table.auto-partition.num-precreate to be altered dynamically after table creation.

Before this change, auto partition retention could be updated by ALTER TABLE, but table.auto-partition.num-precreate was 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

  • Add table.auto-partition.num-precreate to alterable Fluss table options.
  • Refresh AutoPartitionManager when either num-retention or num-precreate changes.
  • When num-precreate is increased, missing future partitions are created after the table property change is observed.
  • When num-precreate is decreased, existing pre-created partitions are kept, and future auto partition runs stop over-creating partitions.
  • Add server-side coverage for updating num-precreate.
  • Add Flink catalog IT coverage for ALTER TABLE SET/RESET ('table.auto-partition.num-precreate' ...).
  • Update docs for Flink DDL/options and partitioning behavior.

Tests

  • AutoPartitionManagerTest#testUpdateAutoPartitionNumPrecreate
  • Flink120CatalogITCase#testAlterAutoPartitionNumPrecreate
  • git diff --check

API 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-precreate to be changed through ALTER TABLE SET and reset through ALTER TABLE RESET.

Documentation

Updated documentation:

  • website/docs/engine-flink/ddl.md
  • website/docs/engine-flink/options.md
  • website/docs/table-design/data-distribution/partitioning.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant