H2: enforce inbound concurrency at activation#554
Closed
arturobernalg wants to merge 3 commits intoapache:masterfrom
Closed
H2: enforce inbound concurrency at activation#554arturobernalg wants to merge 3 commits intoapache:masterfrom
arturobernalg wants to merge 3 commits intoapache:masterfrom
Conversation
Reserve on PUSH_PROMISE; count on first HEADERS; refuse with RST_STREAM. Atomic gate in H2Streams; safe CONTINUATION drain; idempotent localReset.
8fb1d8e to
bf7d524
Compare
Member
|
@arturobernalg I am sorry this change-set came while I was working on the same problem. I ended up with a different solution that takes two atomic integers only instead of two concurrent sets to keep track of active H2 streams. It should be somewhat more efficient but admittedly took a lot of effort on my part to get right. And it also works with both inbound and outbound streams. Please review my code in master and submit any RFC conformance improvements I may have missed. |
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.
Refactor inbound stream lifecycle to be RFC-conformant: reservation (PUSH_PROMISE) vs activation (first HEADERS). Enforce the inbound concurrency limit atomically at activation; refuse overflow with RST_STREAM(REFUSED_STREAM) while draining any outstanding header block.
@ok2c maybe this can work.