[ZODB-Dev] Closing databases with open connections with uncommitted changes

Jim Fulton jim at zope.com
Wed Jul 14 15:39:42 EDT 2010


Currently, an exception is raised if a connection with uncommitted
changes is closed.

There is no error if the connection's database is closed, or if the
program simply exits.

I think it's reasonable to treat a program exit as an implicit abort.

I'm not so sure about closing a database.  If a transaction has
changes in two databases and you close one, should the transaction be
implicitly aborted?

The cleanest thing would be to raise an error if a database being
closed has uncommitted changes.  Unfortunately, this change would
cause lots of existing tests (in and) outside of ZODB to break.

I'm included to stick with the current behavior for now.

Jim

--
Jim Fulton


More information about the ZODB-Dev mailing list