Repository navigation
refactor(storage): consolidate IO reader wrappers - #2570
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Code Review
The error recording logic in the instrumented reader's Close method is mutually exclusive, which may cause read errors to be suppressed if a close error also occurs. A data race exists on the byte count and error fields because they are accessed concurrently by Read and Close without synchronization. Passing a nil error to the completion check in the cache writeback reader creates a regression that prevents the proper caching of short final chunks.
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
0919279 to
b648e63
Compare
244f0e1 to
bfaa4cb
Compare
57dfa58 to
d38984a
Compare
Replace the OpenRangeReader return type io.ReadCloser with a context-aware RangeReader and collapse scattered reader wrappers (offset/section/capture/ observable/decompress) into a single io_wrappers.go. Drops the cacheWriteThroughReader in favor of a reusable captureReader with optional drain-on-close for codecs that stop short of EOF on their source.
d38984a to
082285c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6d9b21d691
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5787a00ad0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
When NewDecompressingReader fails, closing the captureReader drained the raw stream into its buffer and persisted those bytes to NFS, poisoning the .frm cache on a failed miss. Close raw directly on the error path to bypass the drain+writeback side effect.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Unify the scattered io.ReadCloser wrapper types into a single
io_wrappers.go file with interface assertions as a TOC:
offsetReader, instrumentedReader, cancelReader, sectionReader.
Pre-cursor to #2431, taking all non-functional refactoring into a separate PR