Skip to content

new feature: add max elapsed time support to RetryLayer #8110

Description

@ddupg

Feature Description

Add RetryLayer::with_max_elapsed_time(Duration) to stop scheduling retries after a configured time budget.

Problem and Solution

Lance exposes client_retry_timeout and uses it for its native object store providers. Lance is adding retry support for OpenDAL-backed stores in:

lance-format/lance#8363

OpenDAL can map client_max_retries to RetryLayer::with_max_times, but currently has no equivalent for client_retry_timeout.

The elapsed-time primitive should first be implemented in BackON because BackON owns the retry state machine. OpenDAL can then expose it through RetryLayer and apply it consistently to normal and stateful operations.

The timer should start with the first attempt. After a retryable failure, BackON should stop scheduling retries when either the elapsed-time budget or max_times is reached. It should not cancel an attempt or sleep already in progress.

Additional Context

BackON implementation PR: Xuanwo/backon#241

OpenDAL implementation PR: #8111

Expected order:

  1. Implement and release the elapsed-time primitive in BackON.
  2. Expose it through OpenDAL RetryLayer.
  3. Map Lance client_retry_timeout to the OpenDAL API.

Are you willing to contribute to the development of this feature?

  • Yes, I am willing to contribute to the development of this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestreleases-note/featThe PR implements a new feature or has a title that begins with "feat"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions