Skip to content

read: avoid repeated open and close for handle based services #7659

@Xuanwo

Description

@Xuanwo

OpenDAL's current raw read path models Access::read(path, OpRead { range, .. }) as opening one concrete range stream.

This works naturally for HTTP object stores because each range read is a separate request. However, handle based services such as fs, hdfs, sftp, and monoiofs can reuse an opened handle and execute multiple positioned reads against it. The current core reader planner still calls Access::read for every planned range, so those services repeatedly open and close handles for workloads like Reader::read, Reader::fetch, chunked reads, and seek based async readers.

We should change the raw read contract so Access::read(path, OpRead) returns a reusable raw reader for the path and read condition set, and move byte ranges to methods on that returned reader.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions