[ZODB-Dev] Webkit Threading and ZODB 3.3a2: problems on Windows

Christian Robottom Reis kiko at async.com.br
Thu Feb 19 18:14:37 EST 2004


On Thu, Feb 19, 2004 at 06:16:22PM -0500, Matt Feifarek wrote:
> >The transaction is normally associated with a thread.  If a thread
> >begins a transaction but does not finish it, then subsequent calls to
> >get_transaction() will return the old, in-progress transaction.
> >
> A side note: the documentation suggests (or at least suggests enough 
> that we misunderstood it) that unless you do a .commit() your changes 
> are not saved. What I'm learning through everyone's expertise and advice 
> is that objects can be corrupted even if you don't call commit(). It 
> seems that one should definitely call commit() or abort() every time.

Err, actually, the only way data is actually written is by calling
commit() -- your database won't become "corrupt" if you never commit.
However, `never' is too strong for your use case 8)

The problem is rather reusing a transaction and unwittingly commit()ing
data that was lurking in it, uncommited and forgotten. I like
setLocalTransaction() for that reason -- it makes things so much
simpler to grasp.

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331



More information about the ZODB-Dev mailing list