Repository navigation
Conversation
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8704c37ab5
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } catch (error: Throwable) { | ||
| lease.close() | ||
| close() | ||
| throw error |
There was a problem hiding this comment.
Preserve the stream when outbound admission fails
When the transport's frame budget is temporarily exhausted, PeerHashTransport.send() throws before encoding or writing anything and intentionally leaves the stream reusable. This catch nevertheless calls close(), discarding every pending request and disconnecting a healthy peer; it also contradicts this method's contract that exhausted credit returns null. Outbound frame credit needs to be admitted before registering ownership, or pre-write admission failures need to roll back the new request without closing the transport.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 45e5b9e. The transport now exposes a pre-write admission callback: new block ownership is registered only after frame credit is acquired. Frame pressure returns null for a new request without emitting bytes or changing existing ownership. Unsent cancellation returns false and leaves the request uncanceled for retry. Partial writes and deadline expiry still tear down the stream.
The regression saturates the frame budget while a request is live, verifies a second request and cancel leave the stream/bytes/credit unchanged, then verifies the original response remains deliverable and later requests/cancels work after credit returns. Focused tests and iOS compilation pass; the descendant assembly head 908aa34 additionally passes 442 JVM and 421 executed iOS tests, both conformance scenarios and the runtime guard with this fix included.
|
Superseded by #235 (V2 handshake, hash exchange and bounded transport) in the consolidated eight-PR stack for #162. The replacement preserves this PR's code and subsequent fixes; its description links the original head and review discussions. The only additional consolidation fix is the CI-discovered listener cancellation regression, documented on the replacement. All eight replacements have passed their required CI checks. Closing without merging. This branch and its discussions remain available for reference. Review index: #162 (comment) |
V2 block requests now connect explicit response ownership to admitted transport writes and file-aligned layout bounds. Requests cannot cross a real file tail; choke/cancel retain their slots and buffer credit until a matching response. All writes are bounded by the earliest outstanding response deadline, and expired or invalid responses close the connection rather than recycling ambiguous slots.
Stacked on #193, under #162. Delivered blocks retain credit after frame dispatch and connection shutdown and remain explicitly unverified until the consumer validates them. Full event-loop/timer wiring, piece assembly/commit, upload/hash serving and scheduler/runtime integration remain required.
Validation at
8704c37ab543219564fde088c04fe6218addedb6: