Skip to content

fix: add exponential recovery backoff#390

Open
nanookclaw wants to merge 1 commit into
databricks:mainfrom
nanookclaw:fix/stream-recovery-exponential-backoff
Open

fix: add exponential recovery backoff#390
nanookclaw wants to merge 1 commit into
databricks:mainfrom
nanookclaw:fix/stream-recovery-exponential-backoff

Conversation

@nanookclaw

Copy link
Copy Markdown

Summary

Closes #192.

This changes Rust stream creation and recovery retries from a fixed interval default to exponential backoff with full jitter. recovery_backoff_ms remains the fixed interval when RetryStrategy::Fixed is selected, and becomes the base delay for RetryStrategy::ExponentialBackoffWithJitter; max_recovery_backoff_ms caps the computed exponential delay before jitter.

The same retry helper is used by gRPC stream creation, Arrow Flight stream creation, and Arrow supervisor recovery sleeps so the behavior stays consistent across both stream implementations. The default strategy is now exponential backoff with jitter, so wrapper SDKs that rely on the Rust core inherit the safer retry behavior without new dependencies.

Verification

  • cargo fmt --manifest-path rust/sdk/Cargo.toml
  • cargo check -p databricks-zerobus-ingest-sdk
  • cargo check -p databricks-zerobus-ingest-sdk --features arrow-flight
  • cargo test -p databricks-zerobus-ingest-sdk --lib
  • cargo test -p databricks-zerobus-ingest-sdk --features arrow-flight --lib
  • git diff --check

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.

[Rust (affects all language bindings)] Use exponential backoff with jitter for stream recovery retry strategy

1 participant