Skip to content

object_store: range request with suffix #4611

Closed
@clbarnes

Description

@clbarnes

We need to read the last n bytes of a file whose size we do not know. This is supported by HTTP range requests, and access to local files (via Seek), can object_store support it?

object_store::GetOptions::range could take, instead of a core::ops::Range, something like this: https://github.com/clbarnes/byteranges-rs/blob/0a953e7c580e96b65fe28e61ed460d6e221dcd8d/src/request.rs#L6-L51 . So long as From<RangeBounds> is supported this may not have to break any existing code.

The alternative is a HEAD request to find the length and then a range request using the offset from 0, which is twice the round trips.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAny new improvement worthy of a entry in the changelog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions