Skip to content

[elixir] feat: Extend Fluss.Config with writer tuning options#566

Merged
fresh-borzoni merged 2 commits into
apache:mainfrom
nicolazar:feat/elixir-config-writer
May 27, 2026
Merged

[elixir] feat: Extend Fluss.Config with writer tuning options#566
fresh-borzoni merged 2 commits into
apache:mainfrom
nicolazar:feat/elixir-config-writer

Conversation

@nicolazar
Copy link
Copy Markdown
Contributor

@nicolazar nicolazar commented May 26, 2026

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 calls validate_writer before any TCP I/O.

Tests

Tests for the config setters are added in the new test/config_tests.exs:

  • new/1 defaults — all non-bootstrap_servers fields default to nil.
  • One per-setter test for each of the 8 new setters.
  • set_writer_bucket_no_key_assigner/2: happy path (:sticky) and guard failure (assert_raise FunctionClauseError for unsupported atoms).
  • Chained-setters test using |>.

nicolazar added 2 commits May 26, 2026 21:51
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.
Copy link
Copy Markdown
Member

@fresh-borzoni fresh-borzoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nicolazar Thank you for the PR, LGTM

Can you link the appropriate sub-issue, please, with closes sub-issue?

@fresh-borzoni fresh-borzoni merged commit 2e664e1 into apache:main May 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[elixir] writer config options

2 participants