Repository navigation
Let a long poll's later probe wait for a read slot until its deadline - #1380
Merged
Merged
Conversation
A held poll's later probe waited for a read slot with the pool's five-second acquisition deadline whenever its own deadline was further away: with one read slot and many held polls, a slot wait that outlasted five seconds while the poll still had time failed the poll with the typed pool timeout (HTTP 503). A later probe now waits for the slot until the poll's own deadline, however long, and answers as at its deadline if none is free by then (Server #1355). The connection, once the slot is held, keeps the acquisition deadline; the first probe, admission and every claim keep it for the slot too. sqlite_a_long_poll_keeps_waiting_for_a_read_slot_past_the_acquisition_deadline holds the read slot after a poll's first probe for longer than its test pool's two-second acquisition deadline, then starts a workflow and frees the slot: the poll must still be waiting when the slot frees and lease the workflow within a second. With the old slot wait it fails with Database(PoolTimedOut). Part of #1372. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Independent review (fresh reviewer agent, given this PR and #1372): PASS at
Non-blocking findings, now noted in the description and on #1372:
The branch was then updated with main by a merge commit only, with no code change to this PR. |
|
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.



Part of #1372.
Split out of #1378 at review. The fix doesn't depend on the pool size, and it matters more with one read slot.
Problem
A held poll's later probe (any probe after its first) waits for a read slot. The wait ended at the earlier of two deadlines: the poll's own deadline, or the pool's 5 s acquisition deadline.
storage_unavailable,pool_timeout.Change
budgeted_connection_by(probe_connections.rs) changes as follows.docs/server-reference.md(native long-poll capacity).Test
sqlite_a_long_poll_keeps_waiting_for_a_read_slot_past_the_acquisition_deadlineuses a SQLite store whose pool has a 2 s acquisition deadline, and a poll with a 6 s timeout.This replaces the earlier assertion
started.elapsed() >= freed, which the review pointed out was always true.a slot wait past the acquisition deadline is not a pool timeout: Database(PoolTimedOut).The other probe-connection and transition-queue tests also pass (8 passed, 2 ignored, which need a database).
🤖 Generated with Claude Code