Skip to content

feat(oss): add optional streaming and range reads - #33

Closed
wylswz wants to merge 1 commit into
mainfrom
feature/streaming-range
Closed

wylswz wants to merge 1 commit into
mainfrom
feature/streaming-range

Conversation

@wylswz

@wylswz wylswz commented Nov 5, 2026 •

Copy link
Copy Markdown

Summary

Add memory-bounded streaming reads and native byte ranges without changing the existing OSS interface.

  • Add optional StreamingOSS.Open(ctx, key, *ByteRange) (io.ReadCloser, error) for Local FS, S3, Aliyun OSS, and Azure Blob.
  • Add SupportsStreaming, OpenStream, and an ErrStreamingNotSupported sentinel so callers can explicitly detect capabilities; no implicit full-buffer fallback.
  • Support full-object reads, bounded ranges, and offset-to-EOF reads, with range validation, overflow protection, context cancellation, and response Content-Range verification.
  • Keep legacy Load compatible and explicitly buffered; close response bodies on success and failure. Azure retains resumable reads with SDK retry support and signed Range options.
  • Include hermetic SDK-level tests for streaming behavior, range semantics, cancellation, retries, and resource closure.

PR Stack

  1. This PR: streaming API, provider implementations, unit tests, and API documentation (main <- feature/streaming-range).
  2. feat(oss): add streaming range reads with integration CI #32: emulator integration infrastructure and PR CI (feature/streaming-range <- test/streaming-integration).

Registered with GitHub native stacked pull requests as stack #34 using gh stack link. This is the bottom PR; #32 is above it. Merge in stack order using GitHub stack controls. Enterprise caller integration is outside these PRs.

Validation

Real Azure live validation is not claimed: the attempted test-fixture upload was rejected by data-plane permissions. Emulator tests do not validate Azure RBAC or managed identity.

Compatibility

Existing OSS implementations and consumers remain source-compatible. Backends not implementing StreamingOSS explicitly report no support via the helper. Callers must close returned readers and use streaming APIs rather than Load to avoid whole-object buffering.

@wylswz
wylswz added this pull request to stack #34 November 5, 2026 05:28
@wylswz
wylswz removed this pull request from stack #34 November 5, 2026 13:04
@wylswz

wylswz commented Nov 5, 2026

Copy link
Copy Markdown
Author

Superseded by #32, which now targets main and contains both the streaming implementation and its integration-test/CI infrastructure. Consolidated so the feature cannot merge separately from the integration checks. No changes were discarded; both commits remain in #32.

@wylswz wylswz closed this Nov 5, 2026
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.

1 participant