Skip to content

[client] Lookups for a leaderless bucket retry without backoff #4971

Description

@polyzos

Search before asking

  • I searched in the issues and found nothing similar.

Fluss version

1.0.0 (latest release)

Please describe the bug 🐞

Follow-up to #4959. When the client's metadata has no leader for a bucket, LookupSender.groupByLeaderAndType re-queues every lookup for that bucket with no delay. On each pass of the sender loop (about every 100 ms, set by client.lookup.batch-timeout), for every pending lookup the client:

  • calls MetadataUpdater.leaderFor(), which makes up to 3 synchronous metadata requests on the single lookup sender thread;
  • logs Failed to lookup the leader for ... when lookup at WARN with a full stack trace.

With N lookups pending for a leaderless bucket, each pass makes up to 3·N blocking metadata requests to the coordinator. Lookups for healthy buckets wait behind them. The retry backoff added in #4959 doesn't help here: these attempts skip the backoff and don't count as retries, so a lookup can loop like this until a leader appears.

This can happen when a bucket has no leader yet, for example during leader election in a rolling restart, or when the coordinator is unavailable.

Solution

  1. Call leaderFor() once per bucket per pass, and reuse the result or failure for that bucket's other lookups.
  2. Delay re-queued lookups with client.lookup.retry-backoff / -max, growing the delay with each attempt.
  3. Keep today's behavior of not counting these attempts toward client.lookup.max-retries, so lookups don't start failing during routine restarts.
  4. Log one WARN per bucket per pass, with the stack trace only at DEBUG.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Activity

  1. added theissue type on Oct 31, 2026
  2. added this to the v1.1 milestone on Nov 2, 2026
  3. MaheshS08 commented on Nov 3, 2026

    @MaheshS08
    Contributor

    @polyzos , can i take this one?

  4. polyzos commented on Nov 3, 2026

    @polyzos
    ContributorAuthor

    Hi @MaheshS08, thanks for offering! This one is already being handled in #4991, which is up for review, so it's not available. Feel free to grab another open issue though. Happy to point you at something in the client area.

  5. MaheshS08 commented on Nov 3, 2026

    @MaheshS08
    Contributor

    @polyzos , thanks for the update, will grab another open issue 👍

    Hi @MaheshS08, thanks for offering! This one is already being handled in #4991, which is up for review, so it's not available. Feel free to grab another open issue though. Happy to point you at something in the client area.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions