fluss icon indicating copy to clipboard operation
fluss copied to clipboard

[client] Add consumer group owner discovery

Open pisceslj opened this issue 2 weeks ago • 1 comments

Search before asking

  • [x] I searched in the issues and found nothing similar.

Description

Description

Motivation

This is a subtask of #4608.

Add the client-side owner-discovery component for FIP-53 after the consumer-offset table foundation, RPC contract, and server-side owner discovery have been merged. Scanner offset commit and fetch need a reusable component that finds and caches the tablet server owning a consumer group before those operations can be implemented.

Scope

  • Add an internal ConsumerGroupManager that discovers the owner tablet server of a consumer group through FindConsumerGroupOwner via any known tablet server.
  • Cache the discovered owner and share a single in-flight discovery request among concurrent callers.
  • Invalidate the cached owner on demand so later operations rediscover after owner changes or gateway loss.
  • Surface discovery failures as ConsumerGroupOwnerNotAvailableException (a RetriableException) without CompletionException wrapping, so callers can implement retries based on the failure type.
  • Coordinate scanner-thread discovery and RPC-callback state updates through the same monitor pattern used by LogFetcher.
  • Add tests for caching and invalidation, concurrent single-request sharing, decode failures, and the no-known-server failure.

Out of scope

  • Client-side offset commit, fetch, and auto-commit implementations
  • Scanner integration and committed-offset initialization
  • Client-side retry loops and backoff policy
  • Owner migration detection from operation errors

Willingness to contribute

  • [x] I'm willing to submit a PR!

pisceslj avatar Nov 13 '26 10:11 pisceslj

Implemented by https://github.com/apache/fluss/pull/5287

wuchong avatar Nov 22 '26 14:11 wuchong