You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Serve high held-poll counts without a single node-wide probe read slot #1372
#1358 (for #1355) keeps held polls off the last request connection so that registration and producers survive database stalls. With the pool at 4 connections (3 request plus 1 maintenance), held-poll admission, probe and readiness reads share one node-wide read slot, and budgeted transactions use one transition slot.
Measured on MariaDB at 2 CPUs (main vs #1358, 4 producers, 2 s polls; numbers from #1358's description):
64 held polls: start throughput up (13.6 → 17.5–18.1/s); probe wait p50/p99 18/57 → 92/158 ms; empty-poll p99 2.4 → 2.55 s.
256 held polls: start throughput up (10–11 → 15.7–16.2/s); probe wait p50/p99 122/305 → 426/673–859 ms; dispatch p99 0.56 → 1.0–1.08 s.
Two read slots would need a fourth request connection, i.e. POOL_CONNECTIONS = 5. That fails the compile-time prepared-statement budget (MAX × POOL_CONNECTIONS ≤ max_prepared_stmt_count), so it needs a smaller per-connection statement cache, or a different budget split. Taking the second read slot from the current 3-connection request pool would give the last connection back to held polls, which reopens #1204.
Required outcome
Decide how a node serves high held-poll counts (hundreds) without delaying dispatch.
Options: POOL_CONNECTIONS 5 with a smaller statement cache, a configurable request-pool size with a derived cache, batching or coalescing held-poll readiness reads per queue, or another design.
Back the choice with before/after measurements at 64 and 256 held polls.
Done when
The change is merged with current-head checks and an independent review, with the measurements in the PR, or a recorded decision to keep the single read slot.
Addition from #1358's final review: a later probe of a long held poll (20–60 s) that waits more than the 5 s acquisition deadline for the single read slot still fails the whole poll with 503 pool_timeout, instead of treating it as "not ready" and continuing to wait. This was not reached at 256 polls (the longest measured wait was 887 ms), but it is the first failure mode at higher counts. The fix belongs with this issue's capacity decision.
From #1380's review: (1) the storage-pressure admission check (#951) runs at the top of the held-poll loop, before the read-slot wait, so a later probe can now claim on a pressure snapshot up to the poll's timeout old. Re-checking storage_admission.snapshot() after the slot is held would close that. (2) Under extreme load, later probes now keep waiting, so admissions and first probes (5 s cap) take the 503s instead. Both belong to this issue's capacity work.
Activity
rmcdaniel commentedon Nov 26, 2026
Addition from #1358's final review: a later probe of a long held poll (20–60 s) that waits more than the 5 s acquisition deadline for the single read slot still fails the whole poll with 503
pool_timeout, instead of treating it as "not ready" and continuing to wait. This was not reached at 256 polls (the longest measured wait was 887 ms), but it is the first failure mode at higher counts. The fix belongs with this issue's capacity decision.rmcdaniel commentedon Nov 26, 2026
From #1380's review: (1) the storage-pressure admission check (#951) runs at the top of the held-poll loop, before the read-slot wait, so a later probe can now claim on a pressure snapshot up to the poll's timeout old. Re-checking
storage_admission.snapshot()after the slot is held would close that. (2) Under extreme load, later probes now keep waiting, so admissions and first probes (5 s cap) take the 503s instead. Both belong to this issue's capacity work.Give held polls two read slots, wake only the queues a commit makes r…
Give held polls two read slots, wake only the queues a commit makes r…