feat(state): retain resources through bounded block range reads - #942
feat(state): retain resources through bounded block range reads#942czarcas7ic wants to merge 1 commit into
Conversation
Analyzed four files, diff |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
44f1c24 to
e5e87c2
Compare
e5e87c2 to
751346e
Compare
Motivation
Cancelling an async block-range read must not release its resources while the database job or its undelivered result still retains blocks. This is the first refactor chunk extracted from #892, now targeting
main. The former #941 transport backport was withdrawn in favor of the separate Iroh upgrade in #935.Solution
Add a bounded state read that carries caller-owned resources into the blocking job and its result. It returns a contiguous prefix within the byte limit and checks cancellation between lookups. Existing callers and protocol behavior remain unchanged.
Testing
Formatting, patch and changelog checks pass. All 11 focused storage tests pass. Regressions cover cancellation during a running read, undelivered results, byte boundaries, and resource release. Prepared with Codex assistance.
Changelog
Added an internal API fragment for this PR.