feat: Add round robin bucket assigner#360
Conversation
leekeiabstraction
left a comment
There was a problem hiding this comment.
Thank you for your contribution! Left some comments.
There was a problem hiding this comment.
Pull request overview
Adds a configurable bucket assignment strategy for tables without bucket keys, introducing a new round-robin assigner and wiring it through writer configuration to complement the existing sticky behavior.
Changes:
- Add
RoundRobinBucketAssignerimplementation and unit tests for its cycling behavior. - Add
writer_bucket_no_key_assignerconfig option (defaulting tosticky). - Update
WriterClient::create_bucket_assignerto select sticky vs round-robin based on config.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
crates/fluss/src/config.rs |
Introduces a new CLI/serde config field to select the no-key bucket assigner strategy. |
crates/fluss/src/client/write/writer_client.rs |
Wires the config into bucket assigner creation for no-key tables and errors on unknown values. |
crates/fluss/src/client/write/bucket_assigner.rs |
Implements RoundRobinBucketAssigner and adds unit tests for cycling + batch-full behavior flag. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
61ec711 to
6d8269c
Compare
leekeiabstraction
left a comment
There was a problem hiding this comment.
Thank you for the update! Much appreciated. Left additional comments
leekeiabstraction
left a comment
There was a problem hiding this comment.
Thank you for the revision! Just one more question left.
leekeiabstraction
left a comment
There was a problem hiding this comment.
Approved. Thank you for the PR!
luoyuxia
left a comment
There was a problem hiding this comment.
@charlesdong1991 Thanks. LGTM!
Purpose
Linked issue: close #322
Brief change log
Create RoundRobinBucketAssigner and update
create_bucket_assignerto make this config configurable with default ofstickyTests