Repository navigation
1.19.1
Bug fixes
-
Fix: a failover no longer strands ZODB connections with their full cache
(#142). ZODB polls inConnection.open()and in every
transaction.abort(). While PostgreSQL was unreachable,
poll_invalidations()raisedOperationalErrororPoolTimeoutthere.
DB.open()then never returned the connection, and Zope's publisher
skippedclose()after the failingabort(). A connection that is never
closed is never freed, so every request in flight during a failover left
its connection and its whole object cache in memory, and the process grew
with every failover. Nowpoll_invalidations()returnsNoneon any
psycopg.OperationalError, which tells ZODB to invalidate its whole
cache. The next access to the instance's PostgreSQL connection, and every
load()andload_multiple()before it consults the shared cache,
repeats the poll first, so reads get a fresh snapshot. Other exceptions
still propagate. The traceback is logged once per outage, later failures
log one line each.OperationalErrorcovers more than an unreachable server: it includes
PoolTimeout,QueryCanceled(statement_timeout), lock and disk
errors. A flushed cache is cheaper than a stranded connection in all of
them, but it has costs:- After a failover each connection reloads its objects once.
- If the pool is exhausted under load while PostgreSQL is healthy, the
whole object cache is flushed, and the reloads add load while the pool
is saturated. - If the poll query itself keeps failing (for example a persistent
QueryCanceled), every transaction flushes the cache and every read
fails.
New features
- Declare and test Python 3.15 support: trove classifier and CI test matrix.
The test suite passes on 3.15.0 without code changes.
Documentation
-
Fix the write path sequence diagram in the architecture explanation. The
;inBEGIN; pg_advisory_xact_lock(0)ends a Mermaid statement, so the
diagram rendered as "Syntax error in text"; it is now written as#59;. -
Move the reasoning behind the S3 timeout keys from the S3 how-to into the
architecture explanation, turn the how-to section into concrete steps with a
configuration example, mark the keys as added in 1.19, document
ZODB_PGJSONB_IDLE_IN_XACT_TIMEOUT_MS, and list thezodb-s3blobs>=1.2.0
requirement in the dependency table.
Assisted-by: Claude Opus 5.5