[ZODB-Dev] Re: Connection pool makes no sense

Tim Peters tim at zope.com
Thu Dec 29 10:56:19 EST 2005


[Florent Guillaume]
> ...
> The self.all.remove(c) in _ConnectionPool attempts to destroy the
> connection.

Nope, it's simply getting rid of a weak reference that no longer serves a
purpose, to avoid unbounded growth of the .all set in case of ill-behaved
application code, and to speed Python's cyclic gc a little.  Removing the
Connection from .available removed _ConnectionPool's only strong reference
to the Connection.

> If something else has a reference to it once it's closed, then that's a
> bug, and it shouldn't.

Yup!

...

> Even hundreds of ZODB connections is absurd.

I'd settle for calling it uncommon and unexpected.

> Again, with 4 threads you should never get more than 4 Filestorage
> connections plus 4 TemporaryStorage connections.

Bears repeating ;-)



More information about the ZODB-Dev mailing list