What type of request is this?
Follow-up enhancement for table-level auto_flush_interval.
What subsystems are affected?
Distributed Cluster, Storage Engine, Table Engine, Frontend, Datanode
Background
PR #8357 added table-level auto_flush_interval support for the CREATE TABLE path:
CREATE TABLE t (
ts TIMESTAMP TIME INDEX
) WITH ('auto_flush_interval' = '5m');
The PR description explicitly scoped the change to creation time and noted that ALTER TABLE support should follow later:
Scope: this PR covers setting the option at CREATE TABLE. Changing it via ALTER TABLE is a natural follow-up (a SetRegionOption::AutoFlushInterval variant + the apply path in handle_alter); happy to fold it in here if preferred.
Requested follow-up
Support changing the per-table auto flush interval on existing tables:
ALTER TABLE t SET 'auto_flush_interval' = '5m';
This is useful for old/existing tables after upgrade: users can opt in to the new per-table flush cadence without recreating the table.
Current behavior
The statement is currently rejected because the ALTER TABLE SET option plumbing does not include auto_flush_interval yet:
Error: 1004(InvalidArguments), Invalid set table option request: Invalid set region option request, key: auto_flush_interval, value: 5m
Relevant implementation areas:
src/store-api/src/region_request.rs: add a SetRegionOption::AutoFlushInterval variant and parse/validate positive humantime durations.
src/table/src/metadata.rs: persist the table option to TableOptions.extra_options.
src/mito2/src/worker/handle_alter.rs: apply the new interval to the current region options, similar to other fast region options.
Version
Current main / development build after PR #8357.
What type of request is this?
Follow-up enhancement for table-level
auto_flush_interval.What subsystems are affected?
Distributed Cluster, Storage Engine, Table Engine, Frontend, Datanode
Background
PR #8357 added table-level
auto_flush_intervalsupport for theCREATE TABLEpath:The PR description explicitly scoped the change to creation time and noted that
ALTER TABLEsupport should follow later:Requested follow-up
Support changing the per-table auto flush interval on existing tables:
This is useful for old/existing tables after upgrade: users can opt in to the new per-table flush cadence without recreating the table.
Current behavior
The statement is currently rejected because the ALTER TABLE SET option plumbing does not include
auto_flush_intervalyet:Relevant implementation areas:
src/store-api/src/region_request.rs: add aSetRegionOption::AutoFlushIntervalvariant and parse/validate positivehumantimedurations.src/table/src/metadata.rs: persist the table option toTableOptions.extra_options.src/mito2/src/worker/handle_alter.rs: apply the new interval to the current region options, similar to other fast region options.Version
Current main / development build after PR #8357.