#7513·juicefs

Make all object storage requests context-aware

Author: jiefenghuangCreated Sep 4, 2026Updated Sep 4, 2026
Labelskind/featurepriority/normal

What would you like to be added:

Ensure every ObjectStorage operation that accepts context.Context propagates it to the underlying SDK, HTTP request, database call, or I/O operation.

Requirements:

  • Cover all registered backends and operations, including Get, Put, Head, Delete, Copy, List, multipart upload, and Restore.
  • Cancellation and deadlines should stop in-flight I/O promptly and return an error matching context.Canceled or context.DeadlineExceeded.
  • Add backend-specific regression tests using local servers or mocks where possible.
  • If the latest SDK has no per-request context API, record the limitation and evaluate an SDK upgrade or replacement instead of adding a cancellation wrapper that cannot stop the underlying I/O.

PR #7512 covers Get for BOS, Qiniu private downloads, and SQL storage. Known remaining Get gaps include B2, Bunny, OBS, WebDAV, HDFS, SFTP, NFS, Ceph, GlusterFS, file, and mem.

Why is this needed:

Some object storage methods accept a context but ignore it. Canceled requests can therefore continue until the SDK or network timeout, delaying shutdown and retries while holding connections and other resources.