Repository navigation
Conversation
Motivation: A clean transport read close is not an HTTP/2 stream end. A client should keep already completed response bodies and trailers without retaining abandoned entities indefinitely or dropping accepted responses while reporting unanswered requests. Modification: Retire only the client writer and request admission on clean read EOF. Drain completed response entities within the existing completion timeout, respecting earlier deadlines. Complete or fail the response stream without overtaking its already accepted responses; keep the managed client's disconnect handling and avoid replaying requests. Retain the current server path and normal stream ordering. Result: An accepted response survives transport retirement, and queued responses are delivered before a direct connection reports unanswered requests. The configured deadline releases abandoned buffers and settles a client that asks for no more responses. Tests: JDK 17, Scala 2.13.18 and 3.3.9. Six focused typed client checks and two existing ordinary HTTP/2 flow controls per version; scoped formatting, header checks, and http-core MiMa. References: Addresses review on apache#1440. Related apache#1445 and apache#1525. RFC 9113 Section 8.1.
Motivation: A graceful GOAWAY closes request admission on the receiving connection, but does not cancel exchanges the peer has accepted. Modification: Stop opening client streams as soon as the peer retires the connection. Remove requests still queued at the transport boundary or above the advertised limit; allow accepted uploads and responses to finish. Keep managed retries limited to requests not dispatched on the old connection and retain completed response entities for their consumers. Bound draining from the first graceful GOAWAY with the existing client completion timeout without extending an earlier deadline. Close the quiescent writer without canceling transport input ahead of draining already accepted response bodies. Treat subsequent read termination as idempotent. Result: A replacement connection can accept a fresh request without replaying a dispatched sibling or losing an accepted upload, response, or trailer. Tests: Exercise the ordinary client and managed connection with typed HTTP/2 events, including queued admission, accepted uploads, cancellation, a decreasing stream boundary, completed response trailers, reconnect, and retirement of an unfinished local streaming upload on a controlled deadline without disturbing its replacement connection. Retain the clean read-completion cases and ordinary TLS streamed response coverage from the prerequisite. References: RFC 9113 section 6.8; apache#1440; apache#1445
Motivation: The server does not begin retirement when a client sends a graceful HTTP/2 GOAWAY. Modification: Start the existing graceful server drain using its own accepted stream boundary and server grace period. Keep accepted streams and their response trailers intact. Result: Idle connections close; active requests can finish without a repeated peer notice extending the deadline. Tests: Focused JDK 17 Scala 2.13 and 3.3 suites; 15 passed on each axis. References: RFC 9113 section 6.8; stacked on apache#1445.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
When an HTTP/2 client sends
GOAWAY(NO_ERROR), the server should stop accepting new streams without cutting off requests it has already accepted.Modification
GOAWAY(NO_ERROR). Send the reciprocal GOAWAY with the server's last accepted client stream ID, not the ID from the client's frame.pekko.http.server.http2.max-connection-age-gracetimeout. The default remains 30 seconds;infiniteopts out of the deadline. Repeated GOAWAY frames do not extend it.NO_ERRORGOAWAY unchanged.Result
The server stops admitting new streams and lets accepted exchanges finish within its existing shutdown policy.
Tests
http-coreMiMa passed. Paradox rendering was not verified in this run.References
Dependency
Stacked on #1445, whose stack also includes #1440. This draft targets Apache
main, so the full PR diff includes the parent stack. Use the follow-up-only diff for review. Keep this draft until #1445 merges and the follow-up is rebased onmain.