Repository navigation
fix(frontend): reject TTL watermarks on refreshable tables - #27624
yashaggarwal85d wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Creating a FULL_RELOAD refreshable table with a `WATERMARK ... WITH TTL` panicked in the frontend (TTL column outside the pk) or on the compute node (TTL column inside the pk), because the pk-only staging table cannot hold the TTL watermark column. Reject the combination with a clear error until the refresh merge supports TTL. Fixes risingwavelabs#27509
01a486c to
298067b
Compare
|
Hi @yuhao-su, this is the interim frontend check you suggested in #27509: it rejects refresh_mode = 'FULL_RELOAD' combined with WATERMARK ... WITH TTL instead of panicking, and adds planner and SLT tests. Since the issue is on the release-3.1 milestone, could you take a look when you have a moment? A /approve-run-bk would also be appreciated so Buildkite can run on the fork. Thanks! |
|
Hi @tabVersion @BugenZhao, would one of you mind reviewing this? It’s a small frontend check so FULL_RELOAD tables with a TTL watermark get a clear “not supported” error instead of panicking (#27509). Also needs a /approve-run-bk for CI. Thanks! |
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Creating a refreshable table (
refresh_mode = 'FULL_RELOAD') with aWATERMARK ... WITH TTLclause panics today:StreamMaterialize::derive_staging_table_catalog(mapping.try_map_all(stream_key).unwrap()), because the stream key includes the TTL column but the pk-only staging table does not.state_table.rswith an index out of bounds, because the staging catalog copiesclean_watermark_indiceswithout remapping them to the staging table's columns.As suggested in the issue, properly supporting this needs work in the
MaterializeExecutorrefresh merge path (feed TTL watermarks into the table and skip expired rows during the merge). Until then, this PR rejects the combination in the frontend with a clear error, right next to the existing "refreshable tables must have a PRIMARY KEY" check ingen_table_plan:Tests:
Planner tests in
watermark_ttl.yamlcover both cases (TTL column outside and inside the pk).e2e_test/source_inline/refresh/refresh_table.sltasserts bothCREATE TABLEstatements fail with the new error.Closes Refreshable tables with a TTL watermark panic in the frontend or the compute node #27509
Checklist
Documentation
Release note
Creating a refreshable table (
refresh_mode = 'FULL_RELOAD') with aWATERMARK ... WITH TTLnow returns a "not supported" error instead of crashing the frontend or the compute node.This solution was AI-assisted (Claude Code); I reviewed and tested the changes.
Summary by CodeRabbit
WITH TTLwatermarks are now rejected during planning, including when the TTL column is part of a single-column or composite primary key.FULL_RELOAD.