Skip to content

Rust client should retry bootstrap initialization on retriable errors #3744

Description

@slfan1989

Search before asking

  • I searched in the issues and found nothing similar.

Fluss version

0.9.0 (latest release)

Please describe the bug 🐞

Please describe the bug

The Rust client does not retry bootstrap initialization when a bootstrap server returns a retriable error.

Currently, Metadata::init_cluster tries each configured bootstrap server once. When only one bootstrap server is configured, a temporary failure causes connection initialization to fail immediately.

The Java client retries a single bootstrap server up to three times with backoff for retriable errors through tryToInitializeClusterWithRetries. This allows the client to handle cases where the bootstrap server is temporarily unavailable or recovering.

This behavior is pre-existing and was identified during the review of #3711.

Expected behavior

The Rust client should retry bootstrap initialization when it encounters a retriable error.

The behavior should be consistent with the Java client where appropriate:

  • Retry a single bootstrap server up to three times.
  • Apply backoff between retry attempts.
  • Retry only errors classified as retriable.
  • Return immediately for non-retriable errors.
  • Preserve the original error type and error code when all retries are exhausted.
  • Avoid retrying indefinitely.

For multiple bootstrap servers, the retry behavior and its interaction with failover should be clearly defined. For example, the client may try all configured servers before starting another retry round.

Solution

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions