Avatar for the PrefectHQ user
PrefectHQ
prefect
BlogDocsChangelog

Performance History

Latest Results

Only write deployments that a poll actually changes Every worker poll updated every deployment on the work pool's queues, even when nothing had changed. A queue with N deployments meant N row updates per poll. A poll now writes a deployment only if it is not READY, or if its last_polled is older than half of deployment_last_polled_timeout_seconds. Half the timeout keeps last_polled inside the timeout for any poll interval. The CTE still locks every candidate row. A filter there would skip rows, and skipped rows are not locked. A stale NOT_READY from the Foreman could then overwrite a fresh poll. So the rows to write are chosen after the lock. The update writes them in batches, under get_max_query_parameters(). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
chuqCTC:fix/23129-conditional-mark-deployments-ready
2 hours ago
Fix engine-cache collision the previous commit missed Devin's review on this PR caught it: AsyncPostgresConfiguration.engine() has its own ENGINES cache keyed only on (loop, connection_url, echo, timeout). Every per-kind maintenance config built by the previous commit shares identical values for all four, so they all resolved to the same cached engine (and pool) regardless of the distinct config objects — the actual bug was never fixed, only hidden behind three config wrappers that all pointed at one engine underneath. Fix at the root: sqlalchemy_pool_size, sqlalchemy_max_overflow, and connection_app_name are real per-engine settings (baked into the pool and connection identity at construction) that were simply missing from the cache key — two configs differing only in one of these already silently collapsed onto whichever was built first, for any caller, not just db_vacuum. Add them to the cache key. db_vacuum then sets a distinct connection_app_name per kind ("prefect-db-vacuum-<kind>"), which is what actually forces flow_runs/events/orphans onto separate engines now that the cache key accounts for it. As a side benefit it shows up in pg_stat_activity, so an operator can tell the three vacuum connections apart. New regression test awaits .engine() itself (not just the config objects) and asserts the three are distinct engines, per Devin's recommendation, plus that one kind's repeated calls still reuse its own engine. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
WAHIB-EL-KHADIRI:fix/db-vacuum-connection-contention
10 hours ago

Latest Branches

CodSpeed Performance Gauge
0%
Only write deployments that a poll actually changes#23130
3 hours ago
c6da1b6
chuqCTC:fix/23129-conditional-mark-deployments-ready
CodSpeed Performance Gauge
0%
6 hours ago
f559a7b
devin1/oss-8223-flow-ends-completed-when-it-returns-a-list-of-map-results
CodSpeed Performance Gauge
0%
10 hours ago
be3eb3e
WAHIB-EL-KHADIRI:fix/db-vacuum-connection-contention
© 2026 CodSpeed Technology
Home Terms Privacy Docs