Skip to content

Apply disablePausedPriority in HTTPPriorityQueue::updateIfExist - #481

Open
0z5a wants to merge 1 commit into
meta:mainfrom
0z5a:fix/http-priority-update-paused-disabled
Open

0z5a wants to merge 1 commit into
meta:mainfrom
0z5a:fix/http-priority-update-paused-disabled

Conversation

@0z5a

@0z5a 0z5a commented Nov 13, 2026

Copy link
Copy Markdown

Summary

Fixes #479.

With setDisablePausedPriority(true), insertOrUpdate() maps a PAUSED priority to urgency 7, incremental, so the stream stays schedulable. updateIfExist() did not apply that mapping. Updating an enqueued stream to PAUSED erased it from the queue, as if the setting were off. The mapping was moved into the queue in fe61493, and only insertOrUpdate() got it.

This change applies the same mapping at the top of updateIfExist(). With the setting off, behaviour is unchanged: the existing Paused test still passes.

Testing

  • New HTTPPriorityQueueTest.PausedWithDisablePausedPriority, next to Paused. With the setting on, it checks that insertOrUpdate(PAUSED) and updateIfExist(PAUSED) (from a sequential and from an incremental priority) all leave the stream queued at (7, incremental).
  • On main @ 88184e0 the new test fails: contains(id) is false after updateIfExist. With this change, ctest -R '^(RoundRobin|PriorityQueue|HTTPPriorityQueue)' passes 48/48, and ctest -R "PausedPriority|QuicStreamManagerTest.*Priorit" passes 6/6, including QuicPacketSchedulerTest.PausedPriorityDisabled.
  • Built with getdeps (getdeps.py build mvfst) with GCC 13.3 on x86_64 Linux, RelWithDebInfo. Then ninja PriorityQueueTest QuicPacketSchedulerTest QuicStreamManagerTest. The full test suite, proxygen, clang, macOS and Windows were not run.
  • clang-format --dry-run -Werror (20.1.8, quic/.clang-format) is clean on both changed files.
  • The branch is rebased onto main @ 813bc6c. Neither touched file changed upstream in between, so the tests were not re-run after the rebase.

This change was drafted with Claude Code (claude-opus-5-5); the test results above are from the runs described.

With setDisablePausedPriority(true), insertOrUpdate() maps a PAUSED
priority to urgency 7, incremental, so the stream stays schedulable.
updateIfExist() did not apply that mapping: updating an enqueued stream
to PAUSED erased it from the queue, as if the setting were off.

Apply the same mapping in updateIfExist() and add a test next to the
existing Paused test.
@meta-cla meta-cla Bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTPPriorityQueue::updateIfExist drops a PAUSED stream even with disablePausedPriority set

1 participant