Repository navigation
docs: correct cancel_timer, autovacuum and fetch_unprocessed docstrings, document ping - #234
Merged
Merged
Conversation
…gs, document ping
Benchmark gate✅ gate passed
Gated (fails the build): |
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.
For 0.15.1, no issue: four docstrings and one docs paragraph that were wrong or left out something operators need. No code change.
cancel_timer: the docstring said a claimed row's delivery "completes normally". If the worker that claimed it died, the lease stays set untillease_ttl_secondspasses and the row is delivered again, andcancel_timerkeeps returningFalsethe whole time. The docstring now says so.autovacuum.py: the module docstring said the default vacuum threshold grows with the bloated table size. It grows with the live row count (reltuples), so the real problem is a large backlog, which delays vacuum exactly when churn is highest. The recommendation itself doesn't change.fetch_unprocessed: no index covers thequeuefilter, so a call for a rare or empty queue reads the whole table. The docstring now says to keep it for tests and occasional inspection.broker.ping(): it had no docstring. Its database check takes a connection from the engine's pool, so it also fails, after up to 5 seconds, when the application's own sessions hold every pooled connection. The new docstring and the Prometheus/OpenTelemetry setup page, which calledmake_ping_asgia liveness probe, now recommend it as a readiness probe, or leaving the pool room for it behind a liveness probe.That last point is the review finding about
ping()failing while the pool is busy. Since #230, the subscribers can't exhaust the pool on their own. The case left is the application's own sessions using every connection, and failing the probe there is arguably right. Makingping()skip the pool would need SQLAlchemy internals, so this PR documents the behaviour instead.Verification
ruffandtyare clean, and the docs build.