[elixir] feat: Extend Fluss.Config with writer tuning options#566
Merged
Conversation
This commit adds eight new fields to NifConfig covering writer tuning, such as: acks, retries, request max size, idempotence, buffer memory / wait timeout, max in flight requests per bucket, and the bucket-assigner enum (:sticky or :round_robin atoms via NifUnitEnum)
This commit adds eight writer-tuning fields to Fluss.Config and exposes the corresponding setters: acks, retries, request max size, idempotence, buffer, memory/wait timeout, max inflight requests per bucket, and bucket-assigner enum.
fresh-borzoni
approved these changes
May 26, 2026
Member
There was a problem hiding this comment.
@nicolazar Thank you for the PR, LGTM
Can you link the appropriate sub-issue, please, with closes sub-issue?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Linked issue: closes #567, part of #463.
Brief change log
This PR extends the Elixir bindings with new config options for writer tuning, such as: writer acks, retries, request max size, idempotence, buffer memory / wait timeout, max inflight requests per bucket, bucket assigner enum.
We first extend the NifConfig on the rust side to expose the new options, then we add them to
Fluss.Config, with the corresponding setters. The upstream defaults are preserved if fields are not set, but callers may set overrides per field.Validation continues to be handled by
FlussConnection::new(crates/fluss/src/client/connection.rs:40-48) which already callsvalidate_writerbefore any TCP I/O.Tests
Tests for the config setters are added in the new
test/config_tests.exs:new/1defaults — all non-bootstrap_serversfields default tonil.set_writer_bucket_no_key_assigner/2: happy path (:sticky) and guard failure (assert_raise FunctionClauseErrorfor unsupported atoms).|>.