Skip to content

[rust] Add Fluss 1.x protocol support to the admin client#625

Closed
gnuhpc wants to merge 1 commit into
apache:mainfrom
gnuhpc:rust-fluss-1x-support
Closed

[rust] Add Fluss 1.x protocol support to the admin client#625
gnuhpc wants to merge 1 commit into
apache:mainfrom
gnuhpc:rust-fluss-1x-support

Conversation

@gnuhpc

@gnuhpc gnuhpc commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR syncs the Rust client with the Fluss 1.x server protocol and exposes the new admin APIs it introduced.

Proto changes (fluss_api.proto)

  • Added fields to ScanKvRequest: filter_predicate, filter_schema_id, remote_data_dir, filtered_end_offset
  • Added rack field to PbServerNode
  • Added ignore_if_not_exists to CreatePartitionRequest
  • Renamed PbLookupReqForBucket.keykeys (repeated bytes, matches 1.x schema)
  • Added ScanKvResponse.records field
  • Synced new message types for all new RPCs

New message wrappers (src/rpc/message/)

27 new request/response wrapper files covering all admin RPCs that previously lacked Rust bindings:
acquire_kv_snapshot_lease, add_server_tag, alter_cluster_configs, alter_database, alter_table, cancel_rebalance, create_acls, delete_producer_offsets, describe_cluster_configs, drop_acls, drop_kv_snapshot_lease, get_cluster_health, get_kv_snapshot_metadata, get_lake_snapshot, get_latest_kv_snapshots, get_producer_offsets, get_table_stats, list_acls, list_database_summaries, list_kv_snapshots, list_rebalance_progress, list_remote_log_manifests, rebalance, register_producer_offsets, release_kv_snapshot_lease, remove_server_tag, scan_kv

Admin client (src/client/admin.rs)

Added 23 new public methods covering the full admin API surface:
list_databases, list_database_summaries, get_table_schema, alter_table, alter_database, describe_cluster_configs, alter_cluster_configs, get_table_stats, get_latest_kv_snapshots, acquire_kv_snapshot_lease, get_kv_snapshot_metadata, release_kv_snapshot_lease, drop_kv_snapshot_lease, list_kv_snapshots, add_server_tag, remove_server_tag, rebalance, cancel_rebalance, list_rebalance_progress, register_producer_offsets, get_producer_offsets, delete_producer_offsets, create_acls, list_acls, drop_acls, get_lake_snapshot, get_latest_lake_snapshot, get_cluster_health, list_remote_log_manifests

API key registry (src/rpc/api_key.rs)

Added entries for all new 1.x API key IDs (1057–1064).

build.rs

Updated prost_build bytes configuration to use the renamed keys field and the new records field.

Test plan

  • cargo build -p fluss-rs — library builds cleanly
  • cargo clippy -p fluss-rs --tests --features integration_tests,fluss_v1 — no warnings
  • Full integration test coverage is added in a follow-up PR against both server versions

🤖 Generated with Claude Code

Bring the Rust client up to date with the latest Fluss 1.x server API:

- Sync `fluss_api.proto` with the 1.x schema (new/renamed fields such as
  `rack`, `filter_predicate`, `remote_data_dir`, `PbLookupReqForBucket.keys`,
  `ScanKvResponse.records`, and the `ignore_if_not_exists` partition flag).
- Register the new API keys in `api_key.rs`.
- Add RPC message wrappers for the new admin operations: alter table/database,
  cluster config describe/alter, table stats, KV snapshot listing/metadata and
  lease acquire/release/drop, lake snapshot, ACL create/list/drop, server tags,
  rebalance trigger/progress/cancel, producer offset register/get/delete,
  cluster health, remote log manifests, and KV scan.
- Expose all of the above as methods on `FlussAdmin`.
- Adapt existing message wrappers and conversions to the new field shapes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@gnuhpc gnuhpc closed this Jun 17, 2026
@gnuhpc gnuhpc deleted the rust-fluss-1x-support branch June 19, 2026 00:46
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.

2 participants