Skip to content

fix: reject attempts to reparent the HTTP/2 priority tree root - #1674

Open
He-Pin wants to merge 1 commit into
apache:mainfrom
He-Pin:fix/h2-priority-tree-root
Open

He-Pin wants to merge 1 commit into
apache:mainfrom
He-Pin:fix/h2-priority-tree-root

Conversation

@He-Pin

@He-Pin He-Pin commented Nov 26, 2026

Copy link
Copy Markdown
Member

Motivation

The internal HTTP/2 priority tree uses a fixed root sentinel. Removing the root was already rejected, but a root update had no corresponding guard. Two checks for the root and self-dependencies were pending.

Modification

Reject root updates using the existing local argument-check convention. Enable the root and self-dependency tests, covering both new and existing nodes for self-dependency.

Result

Internal tree operations consistently reject attempts to move the root or introduce a self-dependency. The default scheduler and wire behavior are unchanged.

Tests

  • JDK 17, Scala 2.13.18 and 3.3.9: 14 local tree unit tests passed on each version; four unrelated existing tests remain pending.
  • The root regression fails as expected against the unfixed baseline. These focused runs compiled the exact tree and test files with existing dependency classes. No protocol traffic or full CI was run before opening.

References

  • Netty 4.2 DefaultHttp2RemoteFlowControllerTest: local tree argument checks.
  • RFC 9113 §5.3.2 for context on legacy priority signalling.

Motivation:
The internal root is a fixed sentinel, not a repositionable stream node.

Modification:
Reject root updates consistently with removal of the root, and exercise both root and self-dependency contracts in PriorityTreeSpec.

Result:
Invalid local operations leave the tree unchanged. Default scheduling and wire handling are unchanged.

References:
Netty 4.2 DefaultHttp2RemoteFlowControllerTest local programming contracts; RFC 9113 Sections 5.3.2 and 6.3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant