[core] make dynamic-bucket.initial-buckets immutable#7491
Conversation
|
I also hit this issue in a real cross-partition upsert job. Scenario:
It seems that changing The stack trace is like this:
|
|
One more concern is the production impact of this issue. For an already-used dynamic bucket table with a large amount of existing data, if In practice, this is a serious online risk because:
So this is not only a usability issue, but also a stability and operability issue in production environments. It would be much safer to reject changing |
JingsongLi
left a comment
There was a problem hiding this comment.
Simple and correct. Adding @Immutable to DYNAMIC_BUCKET_INITIAL_BUCKETS prevents users from changing this option on existing tables, which would break Flink checkpoint recovery.
+1/-0 (just the annotation). The PR description clearly explains the failure mode (duplicate-key exceptions during bootstrap).
One question: Is there a migration path for users who already have tables with the wrong initial-buckets setting? If they can't change it now, they'd need to recreate the table. Consider adding a note in the error message: "To change this option, create a new table and migrate data."
LGTM.
|
+1 |
Purpose
ISSUE
dynamic-bucket.initial-bucketsaffects assigner/bootstrap semantics for dynamic bucket tables.For existing tables, changing this option may break Flink recovery/checkpoint for cross-partition upsert jobs, and may finally fail during bootstrap with duplicate-key related exceptions.
This PR marks
dynamic-bucket.initial-bucketsas immutable so that users get a clear validation error earlier instead of hitting runtime failures later.Changes
@ImmutabletoCoreOptions.DYNAMIC_BUCKET_INITIAL_BUCKETSTests
API and Format
Documentation
Generative AI tooling