You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "charlesdong1991 (via GitHub)" <gi...@apache.org> on 2026/02/21 14:47:42 UTC
[PR] feat: Add round robin bucket assigner [fluss-rust]
charlesdong1991 opened a new pull request, #360:
URL: https://github.com/apache/fluss-rust/pull/360
### Purpose
<!-- Linking this pull request to the issue -->
Linked issue: close #322
<!-- What is the purpose of the change -->
### Brief change log
Create RoundRobinBucketAssigner and update `create_bucket_assigner` to make this config configurable with default of `sticky`
### Tests
- add test of round_robin_assigner_cycles_through_buckets
- add test of round_robin_assigner_does_not_abort_on_batch_full
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: Add round robin bucket assigner [fluss-rust]
Posted by "charlesdong1991 (via GitHub)" <gi...@apache.org>.
charlesdong1991 commented on code in PR #360:
URL: https://github.com/apache/fluss-rust/pull/360#discussion_r2842896179
##########
crates/fluss/src/client/write/writer_client.rs:
##########
@@ -125,8 +125,12 @@ impl WriterClient {
if let Some(assigner) = self.bucket_assigners.get(table_path) {
assigner.clone()
} else {
- let assigner =
- Self::create_bucket_assigner(table_info, Arc::clone(table_path), bucket_key)?;
+ let assigner = Self::create_bucket_assigner(
+ table_info,
+ Arc::clone(table_path),
+ bucket_key,
+ &self.config,
+ )?;
Review Comment:
addressed @leekeiabstraction
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: Add round robin bucket assigner [fluss-rust]
Posted by "leekeiabstraction (via GitHub)" <gi...@apache.org>.
leekeiabstraction commented on code in PR #360:
URL: https://github.com/apache/fluss-rust/pull/360#discussion_r2843096222
##########
bindings/cpp/src/lib.rs:
##########
@@ -607,12 +608,17 @@ fn err_from_core_error(e: &fcore::error::Error) -> ffi::FfiResult {
// Connection implementation
fn new_connection(config: &ffi::FfiConfig) -> Result<*mut Connection, String> {
+ let assigner_type = match config.writer_bucket_no_key_assigner.as_str() {
+ "round_robin" => fluss::config::NoKeyAssigner::RoundRobin,
+ _ => fluss::config::NoKeyAssigner::Sticky,
Review Comment:
Does this silently fallback to sticky? What if user has a typo in round robin? Also curious about how other configuration behave on illegal values (both currently in rust and Java)
I think that left shift and fail fast is a better user experience
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: Add round robin bucket assigner [fluss-rust]
Posted by "charlesdong1991 (via GitHub)" <gi...@apache.org>.
charlesdong1991 commented on code in PR #360:
URL: https://github.com/apache/fluss-rust/pull/360#discussion_r2837417503
##########
crates/fluss/src/client/write/bucket_assigner.rs:
##########
@@ -106,6 +106,41 @@ impl BucketAssigner for StickyBucketAssigner {
}
}
+/// Unlike [StickyBucketAssigner], each record is assigned to the next bucket
+/// in a rotating sequence, providing even data distribution across all buckets.
+pub struct RoundRobinBucketAssigner {
+ table_path: Arc<PhysicalTablePath>,
+ counter: AtomicI32,
Review Comment:
added!
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: Add round robin bucket assigner [fluss-rust]
Posted by "leekeiabstraction (via GitHub)" <gi...@apache.org>.
leekeiabstraction commented on code in PR #360:
URL: https://github.com/apache/fluss-rust/pull/360#discussion_r2836312402
##########
crates/fluss/src/client/write/bucket_assigner.rs:
##########
@@ -106,6 +106,41 @@ impl BucketAssigner for StickyBucketAssigner {
}
}
+/// Unlike [StickyBucketAssigner], each record is assigned to the next bucket
+/// in a rotating sequence, providing even data distribution across all buckets.
+pub struct RoundRobinBucketAssigner {
+ table_path: Arc<PhysicalTablePath>,
+ counter: AtomicI32,
Review Comment:
We can store bucket number like Java side as well instead of Cluster's method.
##########
crates/fluss/src/client/write/writer_client.rs:
##########
@@ -125,8 +125,12 @@ impl WriterClient {
if let Some(assigner) = self.bucket_assigners.get(table_path) {
assigner.clone()
} else {
- let assigner =
- Self::create_bucket_assigner(table_info, Arc::clone(table_path), bucket_key)?;
+ let assigner = Self::create_bucket_assigner(
+ table_info,
+ Arc::clone(table_path),
+ bucket_key,
+ &self.config,
+ )?;
self.bucket_assigners
.insert(Arc::clone(table_path), Arc::clone(&assigner.clone()));
Review Comment:
Just spotted an unnecessary clone here, would appreciate if you can amend this line to๐
```rust
.insert(Arc::clone(table_path), Arc::clone(&assigner));
```
##########
crates/fluss/src/client/write/bucket_assigner.rs:
##########
@@ -106,6 +106,41 @@ impl BucketAssigner for StickyBucketAssigner {
}
}
+/// Unlike [StickyBucketAssigner], each record is assigned to the next bucket
+/// in a rotating sequence, providing even data distribution across all buckets.
+pub struct RoundRobinBucketAssigner {
+ table_path: Arc<PhysicalTablePath>,
+ counter: AtomicI32,
+}
+
+impl RoundRobinBucketAssigner {
+ pub fn new(table_path: Arc<PhysicalTablePath>) -> Self {
+ Self {
+ table_path,
+ counter: AtomicI32::new(0),
Review Comment:
Java side uses random initial value, that is actually helpful when multiple writers are used in that they don't write to the same bucket at the same time or in another scenario, if users misuse and create writer per-write, writes will only ever go to bucket 0.
```java
public class RoundRobinBucketAssigner extends DynamicBucketAssigner {
...
private final AtomicInteger counter = new AtomicInteger(new Random().nextInt());
}
```
##########
crates/fluss/src/client/write/writer_client.rs:
##########
@@ -173,8 +178,15 @@ impl WriterClient {
function,
)))
} else {
- // TODO: Wire up toi use round robin/sticky according to ConfigOptions.CLIENT_WRITER_BUCKET_NO_KEY_ASSIGNER
- Ok(Arc::new(StickyBucketAssigner::new(table_path)))
+ match config.writer_bucket_no_key_assigner.as_str() {
+ "sticky" => Ok(Arc::new(StickyBucketAssigner::new(table_path))),
+ "round_robin" => Ok(Arc::new(RoundRobinBucketAssigner::new(table_path))),
Review Comment:
These could be enums as well like Java side. Can we also ensure that documentation are updated to describe these?
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: Add round robin bucket assigner [fluss-rust]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #360:
URL: https://github.com/apache/fluss-rust/pull/360#discussion_r2837014400
##########
crates/fluss/src/client/write/writer_client.rs:
##########
@@ -125,8 +125,12 @@ impl WriterClient {
if let Some(assigner) = self.bucket_assigners.get(table_path) {
assigner.clone()
} else {
- let assigner =
- Self::create_bucket_assigner(table_info, Arc::clone(table_path), bucket_key)?;
+ let assigner = Self::create_bucket_assigner(
+ table_info,
+ Arc::clone(table_path),
+ bucket_key,
+ &self.config,
+ )?;
Review Comment:
`RoundRobinBucketAssigner::abort_if_batch_full()` is never actually consulted by `WriterClient::send` (it always calls `RecordAccumulator::append(..., abort_if_batch_full = true)`), so selecting `round_robin` will still cause records to be retried with a new bucket when a batch is full. Please thread `bucket_assigner.abort_if_batch_full()` into the initial `append` call so round-robin can create a new batch for the same bucket instead of forcing a reassign.
##########
crates/fluss/src/client/write/writer_client.rs:
##########
@@ -125,8 +125,12 @@ impl WriterClient {
if let Some(assigner) = self.bucket_assigners.get(table_path) {
assigner.clone()
} else {
- let assigner =
- Self::create_bucket_assigner(table_info, Arc::clone(table_path), bucket_key)?;
+ let assigner = Self::create_bucket_assigner(
+ table_info,
+ Arc::clone(table_path),
+ bucket_key,
+ &self.config,
+ )?;
self.bucket_assigners
.insert(Arc::clone(table_path), Arc::clone(&assigner.clone()));
Review Comment:
Redundant cloning when inserting into `bucket_assigners`: `Arc::clone(&assigner.clone())` clones the `Arc` twice. This can be simplified to a single clone (e.g., `assigner.clone()` or `Arc::clone(&assigner)`) to reduce unnecessary work and improve readability.
```suggestion
.insert(Arc::clone(table_path), Arc::clone(&assigner));
```
##########
crates/fluss/src/client/write/writer_client.rs:
##########
@@ -173,8 +178,15 @@ impl WriterClient {
function,
)))
} else {
- // TODO: Wire up toi use round robin/sticky according to ConfigOptions.CLIENT_WRITER_BUCKET_NO_KEY_ASSIGNER
- Ok(Arc::new(StickyBucketAssigner::new(table_path)))
+ match config.writer_bucket_no_key_assigner.as_str() {
+ "sticky" => Ok(Arc::new(StickyBucketAssigner::new(table_path))),
+ "round_robin" => Ok(Arc::new(RoundRobinBucketAssigner::new(table_path))),
+ other => Err(Error::IllegalArgument {
+ message: format!(
+ "unknown writer_bucket_no_key_assigner '{other}', expected 'sticky' or 'round_robin'"
+ ),
+ }),
+ }
Review Comment:
The new `writer_bucket_no_key_assigner` wiring in `create_bucket_assigner` isnโt covered by tests (e.g., asserting that "round_robin" selects `RoundRobinBucketAssigner` and an unknown value returns `IllegalArgument`). Adding a small unit test around `WriterClient::create_bucket_assigner` would prevent regressions in config handling.
##########
crates/fluss/src/config.rs:
##########
@@ -45,6 +46,11 @@ pub struct Config {
#[arg(long, default_value_t = DEFAULT_WRITER_BATCH_SIZE)]
pub writer_batch_size: i32,
+ /// Bucket assigner for tables without bucket keys: "sticky" or "round_robin".
+ /// It is to match Java `client.writer.bucket.no-key-assigner`.
+ #[arg(long, default_value_t = String::from(DEFAULT_BUCKET_NO_KEY_ASSIGNER))]
Review Comment:
This config value is only validated at runtime when a record without a bucket key is written. Since the allowed values are fixed, consider enforcing them at CLI parse time (e.g., via `clap` value parser / `ValueEnum`) so invalid values fail fast with a clear usage error.
```suggestion
#[arg(
long,
value_parser = ["sticky", "round_robin"],
default_value = DEFAULT_BUCKET_NO_KEY_ASSIGNER
)]
```
##########
crates/fluss/src/client/write/bucket_assigner.rs:
##########
@@ -106,6 +106,41 @@ impl BucketAssigner for StickyBucketAssigner {
}
}
+/// Unlike [StickyBucketAssigner], each record is assigned to the next bucket
+/// in a rotating sequence, providing even data distribution across all buckets.
+pub struct RoundRobinBucketAssigner {
+ table_path: Arc<PhysicalTablePath>,
+ counter: AtomicI32,
+}
+
+impl RoundRobinBucketAssigner {
+ pub fn new(table_path: Arc<PhysicalTablePath>) -> Self {
+ Self {
+ table_path,
+ counter: AtomicI32::new(0),
+ }
+ }
+}
+
+impl BucketAssigner for RoundRobinBucketAssigner {
+ fn abort_if_batch_full(&self) -> bool {
+ false
+ }
+
+ fn on_new_batch(&self, _cluster: &Cluster, _prev_bucket_id: i32) {}
+
+ fn assign_bucket(&self, _bucket_key: Option<&Bytes>, cluster: &Cluster) -> Result<i32> {
+ let available_buckets = cluster.get_available_buckets_for_table_path(&self.table_path);
+ let idx = self.counter.fetch_add(1, Ordering::Relaxed) & i32::MAX;
+ if available_buckets.is_empty() {
+ let num_buckets = cluster.get_bucket_count(self.table_path.get_table_path());
Review Comment:
Potential panic: when `available_buckets` is empty, this does `idx % num_buckets` where `num_buckets` comes from `cluster.get_bucket_count(...)` and is not validated to be > 0. If a table is ever created/loaded with `num_buckets == 0`, this will panic (division by zero). Consider returning an `IllegalArgument`/`invalid_table` error when `num_buckets <= 0` instead of performing the modulo.
```suggestion
let num_buckets = cluster.get_bucket_count(self.table_path.get_table_path());
if num_buckets <= 0 {
return Err(IllegalArgument(
"Bucket count for table must be positive in RoundRobinBucketAssigner"
.to_string(),
));
}
```
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: Add round robin bucket assigner [fluss-rust]
Posted by "charlesdong1991 (via GitHub)" <gi...@apache.org>.
charlesdong1991 commented on code in PR #360:
URL: https://github.com/apache/fluss-rust/pull/360#discussion_r2837422963
##########
crates/fluss/src/client/write/writer_client.rs:
##########
@@ -125,8 +125,12 @@ impl WriterClient {
if let Some(assigner) = self.bucket_assigners.get(table_path) {
assigner.clone()
} else {
- let assigner =
- Self::create_bucket_assigner(table_info, Arc::clone(table_path), bucket_key)?;
+ let assigner = Self::create_bucket_assigner(
+ table_info,
+ Arc::clone(table_path),
+ bucket_key,
+ &self.config,
+ )?;
self.bucket_assigners
.insert(Arc::clone(table_path), Arc::clone(&assigner.clone()));
Review Comment:
done! nice catch!
##########
crates/fluss/src/client/write/writer_client.rs:
##########
@@ -173,8 +178,15 @@ impl WriterClient {
function,
)))
} else {
- // TODO: Wire up toi use round robin/sticky according to ConfigOptions.CLIENT_WRITER_BUCKET_NO_KEY_ASSIGNER
- Ok(Arc::new(StickyBucketAssigner::new(table_path)))
+ match config.writer_bucket_no_key_assigner.as_str() {
+ "sticky" => Ok(Arc::new(StickyBucketAssigner::new(table_path))),
+ "round_robin" => Ok(Arc::new(RoundRobinBucketAssigner::new(table_path))),
Review Comment:
changed to enum! thanks!
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: Add round robin bucket assigner [fluss-rust]
Posted by "charlesdong1991 (via GitHub)" <gi...@apache.org>.
charlesdong1991 commented on code in PR #360:
URL: https://github.com/apache/fluss-rust/pull/360#discussion_r2843190413
##########
bindings/cpp/src/lib.rs:
##########
@@ -607,12 +608,17 @@ fn err_from_core_error(e: &fcore::error::Error) -> ffi::FfiResult {
// Connection implementation
fn new_connection(config: &ffi::FfiConfig) -> Result<*mut Connection, String> {
+ let assigner_type = match config.writer_bucket_no_key_assigner.as_str() {
+ "round_robin" => fluss::config::NoKeyAssigner::RoundRobin,
+ _ => fluss::config::NoKeyAssigner::Sticky,
Review Comment:
ah, good catch! Rust, Java and Python will fail fast right now
will make a change!
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: Add round robin bucket assigner [fluss-rust]
Posted by "leekeiabstraction (via GitHub)" <gi...@apache.org>.
leekeiabstraction commented on code in PR #360:
URL: https://github.com/apache/fluss-rust/pull/360#discussion_r2839745429
##########
crates/fluss/src/client/write/writer_client.rs:
##########
@@ -125,8 +125,12 @@ impl WriterClient {
if let Some(assigner) = self.bucket_assigners.get(table_path) {
assigner.clone()
} else {
- let assigner =
- Self::create_bucket_assigner(table_info, Arc::clone(table_path), bucket_key)?;
+ let assigner = Self::create_bucket_assigner(
+ table_info,
+ Arc::clone(table_path),
+ bucket_key,
+ &self.config,
+ )?;
Review Comment:
+1
##########
bindings/cpp/include/fluss.hpp:
##########
@@ -979,6 +979,8 @@ struct Configuration {
int32_t writer_retries{std::numeric_limits<int32_t>::max()};
// Writer batch size in bytes (2 MB)
int32_t writer_batch_size{2 * 1024 * 1024};
+ // Bucket assigner for tables without bucket keys: "sticky" or "round_robin"
+ std::string writer_bucket_no_key_assigner{"sticky"};
Review Comment:
Let's use the same casing as Java side for configuration e.g. `STICKY` or `ROUND_ROBIN`https://fluss.apache.org/docs/0.5/maintenance/configuration/
##########
crates/fluss/src/config.rs:
##########
@@ -28,6 +29,26 @@ const DEFAULT_MAX_POLL_RECORDS: usize = 500;
const DEFAULT_ACKS: &str = "all";
+/// Bucket assigner strategy for tables without bucket keys.
+/// Matches Java `client.writer.bucket.no-key-assigner`.
+#[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum, Deserialize, Serialize)]
+#[serde(rename_all = "snake_case")]
+pub enum BucketAssignerType {
Review Comment:
Let's be more elaborate on the enum name. BucketAssigner is a very broad term which includes HashBucketAssigner. Call this `NoKeyAssigner` like Java side?
##########
website/docs/user-guide/python/example/configuration.md:
##########
@@ -21,16 +21,17 @@ with await fluss.FlussConnection.create(config) as conn:
## Connection Configurations
-| Key | Description | Default |
-|---------------------|-------------------------------------------------------|--------------------|
-| `bootstrap.servers` | Coordinator server address | `127.0.0.1:9123` |
-| `writer.request-max-size` | Maximum request size in bytes | `10485760` (10 MB) |
-| `writer.acks` | Acknowledgment setting (`all` waits for all replicas) | `all` |
-| `writer.retries` | Number of retries on failure | `2147483647` |
-| `writer.batch-size` | Batch size for writes in bytes | `2097152` (2 MB) |
-| `scanner.remote-log.prefetch-num` | Number of remote log segments to prefetch | `4` |
-| `remote-file.download-thread-num` | Number of threads for remote log downloads | `3` |
-| `scanner.log.max-poll-records` | Max records returned in a single poll() | `500` |
+| Key | Description | Default |
+|------------------------------------|--------------------------------------------------------------------------------------|--------------------|
+| `bootstrap.servers` | Coordinator server address | `127.0.0.1:9123` |
+| `writer.request-max-size` | Maximum request size in bytes | `10485760` (10 MB) |
+| `writer.acks` | Acknowledgment setting (`all` waits for all replicas) | `all` |
+| `writer.retries` | Number of retries on failure | `2147483647` |
+| `writer.batch-size` | Batch size for writes in bytes | `2097152` (2 MB) |
+| `writer.bucket.no-key-assigner` | Bucket assignment strategy for tables without bucket keys: `sticky` or `round_robin` | `sticky` |
Review Comment:
Similar as earlier comment, use same casing as Java side.
##########
website/docs/user-guide/rust/example/configuration.md:
##########
@@ -17,10 +17,11 @@ let conn = FlussConnection::new(config).await?;
## Connection Configurations
-| Option | Description | Default |
-|---------------------------|-------------------------------------------------------|------------------|
-| `bootstrap_servers` | Coordinator server address | `127.0.0.1:9123` |
-| `writer_request_max_size` | Maximum request size in bytes | 10 MB |
-| `writer_acks` | Acknowledgment setting (`all` waits for all replicas) | `all` |
-| `writer_retries` | Number of retries on failure | `i32::MAX` |
-| `writer_batch_size` | Batch size for writes | 2 MB |
+| Option | Description | Default |
+|---------------------------------|-----------------------------------------------------------------------------|------------------|
+| `bootstrap_servers` | Coordinator server address | `127.0.0.1:9123` |
+| `writer_request_max_size` | Maximum request size in bytes | 10 MB |
+| `writer_acks` | Acknowledgment setting (`all` waits for all replicas) | `all` |
+| `writer_retries` | Number of retries on failure | `i32::MAX` |
+| `writer_batch_size` | Batch size for writes | 2 MB |
+| `writer_bucket_no_key_assigner` | Bucket assignment strategy for tables without bucket keys: `sticky` or `round_robin` | `sticky` |
Review Comment:
nit: Markdown table indentation / justify
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: Add round robin bucket assigner [fluss-rust]
Posted by "charlesdong1991 (via GitHub)" <gi...@apache.org>.
charlesdong1991 commented on code in PR #360:
URL: https://github.com/apache/fluss-rust/pull/360#discussion_r2843200515
##########
bindings/cpp/src/lib.rs:
##########
@@ -607,12 +608,17 @@ fn err_from_core_error(e: &fcore::error::Error) -> ffi::FfiResult {
// Connection implementation
fn new_connection(config: &ffi::FfiConfig) -> Result<*mut Connection, String> {
+ let assigner_type = match config.writer_bucket_no_key_assigner.as_str() {
+ "round_robin" => fluss::config::NoKeyAssigner::RoundRobin,
+ _ => fluss::config::NoKeyAssigner::Sticky,
Review Comment:
updated! thanks @leekeiabstraction ๐
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: Add round robin bucket assigner [fluss-rust]
Posted by "charlesdong1991 (via GitHub)" <gi...@apache.org>.
charlesdong1991 commented on code in PR #360:
URL: https://github.com/apache/fluss-rust/pull/360#discussion_r2840033829
##########
bindings/cpp/include/fluss.hpp:
##########
@@ -979,6 +979,8 @@ struct Configuration {
int32_t writer_retries{std::numeric_limits<int32_t>::max()};
// Writer batch size in bytes (2 MB)
int32_t writer_batch_size{2 * 1024 * 1024};
+ // Bucket assigner for tables without bucket keys: "sticky" or "round_robin"
+ std::string writer_bucket_no_key_assigner{"sticky"};
Review Comment:
thanks! @leekeiabstraction
just to help my future PRs, the idea is to be mirroring to naming from Java side? since i think sticky or round_robin is more like Rust pattern
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: Add round robin bucket assigner [fluss-rust]
Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia merged PR #360:
URL: https://github.com/apache/fluss-rust/pull/360
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: Add round robin bucket assigner [fluss-rust]
Posted by "charlesdong1991 (via GitHub)" <gi...@apache.org>.
charlesdong1991 commented on code in PR #360:
URL: https://github.com/apache/fluss-rust/pull/360#discussion_r2842363198
##########
bindings/cpp/include/fluss.hpp:
##########
@@ -979,6 +979,8 @@ struct Configuration {
int32_t writer_retries{std::numeric_limits<int32_t>::max()};
// Writer batch size in bytes (2 MB)
int32_t writer_batch_size{2 * 1024 * 1024};
+ // Bucket assigner for tables without bucket keys: "sticky" or "round_robin"
+ std::string writer_bucket_no_key_assigner{"sticky"};
Review Comment:
Also, it seems the codebase is using lowercase now actually: https://github.com/apache/fluss/blob/4f74f32eafb74890f0b1069242ba18900e29f5ef/website/docs/table-design/data-distribution/bucketing.md?plain=1#L28 @leekeiabstraction
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: Add round robin bucket assigner [fluss-rust]
Posted by "leekeiabstraction (via GitHub)" <gi...@apache.org>.
leekeiabstraction commented on code in PR #360:
URL: https://github.com/apache/fluss-rust/pull/360#discussion_r2843070343
##########
bindings/cpp/include/fluss.hpp:
##########
@@ -979,6 +979,8 @@ struct Configuration {
int32_t writer_retries{std::numeric_limits<int32_t>::max()};
// Writer batch size in bytes (2 MB)
int32_t writer_batch_size{2 * 1024 * 1024};
+ // Bucket assigner for tables without bucket keys: "sticky" or "round_robin"
+ std::string writer_bucket_no_key_assigner{"sticky"};
Review Comment:
Oh, not aware of that. Thanks for the reference
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org