Skip to content

ensure tracked receiver not subject to i/o budget#48378

Merged
jkarneges merged 1 commit into
mainfrom
jkarneges/recv-no-budget
Jun 29, 2026
Merged

ensure tracked receiver not subject to i/o budget#48378
jkarneges merged 1 commit into
mainfrom
jkarneges/recv-no-budget

Conversation

@jkarneges

@jkarneges jkarneges commented Jun 27, 2026

Copy link
Copy Markdown
Member

Connection tasks are expected to consume all ZHTTP messages waiting for them when they are next polled. However, if a task exhausts its I/O budget then it may return from its poll method without having consumed all the messages. This PR makes reads from TrackedAsyncLocalReceiver (the type used exclusively for reading these messages) exempt from the I/O budget so that the tasks can meet their obligations no matter what.

Allowing unlimited reads here is not as scary as it sounds. The channel has a queue size of 1, and the sending task yields while the receiving task is polled, meaning there should only ever be 1 message for the receiving task to read. This change should not result in tasks doing unfair numbers of reads.

@jkarneges jkarneges requested a review from a team June 27, 2026 00:54
@jkarneges jkarneges merged commit e809e7c into main Jun 29, 2026
19 checks passed
@jkarneges jkarneges deleted the jkarneges/recv-no-budget branch June 29, 2026 17:38
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.

2 participants