Skip to content

fix: bound event and channel queues - #700

Merged
cofin merged 2 commits into
mainfrom
fix/queue-things
Aug 11, 2026
Merged

fix: bound event and channel queues#700
cofin merged 2 commits into
mainfrom
fix/queue-things

Conversation

@cofin

@cofin cofin commented Aug 11, 2026

Copy link
Copy Markdown
Member

What changed

  • add configurable drop-oldest capacity to PostgreSQL listener buffers
  • bound Litestar channel output independently with depth and drop diagnostics
  • validate the shared event setting across adapters and document transport behavior

Why

PostgreSQL listener consumers and the Litestar Channels backend used unbounded in-memory queues, allowing slow consumers to grow memory without limit.

Closes #698
Closes #699

@codecov-commenter

codecov-commenter commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.87234% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.32%. Comparing base (851db3b) to head (5a6a1ef).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sqlspec/extensions/events/_buffer.py 91.30% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #700      +/-   ##
==========================================
- Coverage   77.40%   76.32%   -1.09%     
==========================================
  Files         486      487       +1     
  Lines       68307    68387      +80     
  Branches     9410     9418       +8     
==========================================
- Hits        52876    52197     -679     
- Misses      12023    12815     +792     
+ Partials     3408     3375      -33     
Flag Coverage Δ
integration 58.80% <79.78%> (-2.05%) ⬇️
py3.10 75.81% <97.87%> (+0.09%) ⬆️
py3.11 75.83% <97.87%> (+0.10%) ⬆️
py3.12 75.83% <97.87%> (+0.09%) ⬆️
py3.13 74.48% <97.87%> (-1.27%) ⬇️
py3.14 64.26% <90.32%> (-12.35%) ⬇️
unit 65.14% <90.42%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sqlspec/adapters/asyncpg/events/_hub.py 76.74% <100.00%> (+1.43%) ⬆️
sqlspec/adapters/psqlpy/events/_hub.py 78.60% <100.00%> (+0.97%) ⬆️
sqlspec/adapters/psycopg/events/_hub.py 80.58% <100.00%> (-0.09%) ⬇️
sqlspec/config.py 93.88% <100.00%> (+0.01%) ⬆️
sqlspec/extensions/events/_channel.py 77.49% <100.00%> (-2.64%) ⬇️
sqlspec/extensions/events/_store.py 95.74% <100.00%> (+0.09%) ⬆️
sqlspec/extensions/litestar/channels.py 83.72% <100.00%> (+6.60%) ⬆️
sqlspec/extensions/events/_buffer.py 91.30% <91.30%> (ø)

... and 41 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cofin
cofin marked this pull request as ready for review August 11, 2026 19:50
@cofin cofin changed the title fix(#698, #699): bound event and channel queues fix: bound event and channel queues Aug 11, 2026
@cofin
cofin merged commit 8310f31 into main Aug 11, 2026
11 checks passed
@cofin
cofin deleted the fix/queue-things branch August 11, 2026 20:49
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.

feat: bound SQLSpecChannelsBackend output queue feat: bound asyncpg event listener consumer queues

2 participants