Skip to content

[client] Add exponential backoff to lookup retries - #4970

Merged
SteNicholas merged 2 commits into
apache:mainfrom
polyzos:client-lookup-retry-backoff
Nov 2, 2026
Merged

SteNicholas merged 2 commits into
apache:mainfrom
polyzos:client-lookup-retry-backoff

Conversation

@polyzos

@polyzos polyzos commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

closes #4959

Retriable lookup errors now back off exponentially instead of retrying immediately, and retry logging is one line per bucket batch.

@polyzos polyzos added this to the v1.1 milestone Oct 31, 2026
@polyzos

polyzos commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

@fresh-borzoni @swuferhong PTAL

| `client.lookup.retry-backoff` | `100 ms` | Duration | The initial delay before retrying a lookup that failed with a retriable error, such as `NOT_LEADER_OR_FOLLOWER`. The delay doubles with the lookup retry count and uses 20% jitter. Set to `0` to disable this backoff. |
| `client.lookup.retry-backoff-max` | `1 s` | Duration | The maximum retry delay. Must be between the initial backoff and `2147483647ms`. |

The retry backoff applies to each failed lookup and prefix lookup, preventing the client from

@Jackeyzhe Jackeyzhe Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could we scope “each failed lookup” to retriable RPC response errors?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, though it's not only RPC response errors, lost connections and timeouts are backed off too

@fresh-borzoni fresh-borzoni left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@polyzos LGTM, thank you 👍
we should also handle this in rust, but it's for follow-up

@SteNicholas

Copy link
Copy Markdown
Member

@fresh-borzoni, I would like to take this follow up for rust.

@polyzos

polyzos commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

@SteNicholas Sure, just open a ticket to track it 👍

@SteNicholas SteNicholas mentioned this pull request Nov 2, 2026
1 of 2 tasks

@SteNicholas SteNicholas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@SteNicholas
SteNicholas merged commit 82deb67 into apache:main Nov 2, 2026
21 checks passed
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.

[client] Lookup retries have no backoff: retriable errors cause a tight retry loop and log flood

4 participants