fhan688 opened a new pull request, #3453:
URL: https://github.com/apache/fluss/pull/3453
### Purpose
Linked issue: https://github.com/apache/fluss/issues/3353
Currently, `table.auto-partition.enabled` cannot be altered after table
creation, while related auto-partition options such as
`table.auto-partition.num-retention` already support dynamic updates.
This PR supports altering `table.auto-partition.enabled` so users can
enable or disable auto partitioning for an existing partitioned table without
recreating the table.
### Brief change log
- Add `table.auto-partition.enabled` to alterable table options.
- Add value-based comparison for `AutoPartitionStrategy` so coordinator
can detect full auto-partition strategy changes.
- Update coordinator table-change handling to react to auto-partition
strategy changes, instead of only checking retention changes.
- Add `AutoPartitionManager#handleAutoPartitionStrategyChange` to handle:
- disabled -> enabled: register the table and trigger immediate
partition creation.
- enabled -> disabled: remove the table from the auto-partition
scheduler.
- enabled -> enabled with strategy changes: refresh auto-partition table
metadata.
- Skip stale scheduled auto-partition tasks when the table has already
been removed from the scheduler.
- Add server and Flink SQL tests for altering
`table.auto-partition.enabled`.
### Tests
- `AutoPartitionManagerTest#testUpdateAutoPartitionEnabled`
- `Flink120CatalogITCase#testAlterAutoPartitionEnabled`
- `Flink120CatalogITCase#testAlterAutoPartitionRetention`
- `Flink120CatalogITCase#testAlterTableConfig`
- `git diff --check`
- `spotless:apply`
### API and Format
No storage format or RPC format changes.
This changes user-visible table option behavior by making the existing
`table.auto-partition.enabled` option alterable. No new Java public API is
introduced.
### Documentation
No new table option is introduced. This PR only makes the existing
`table.auto-partition.enabled` option dynamically alterable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]