[ZODB-Dev] ZODB file never updated - import transaction fails...

Dieter Maurer dieter at handshake.de
Thu Aug 3 12:54:11 EDT 2006


skip at pobox.com wrote at 2006-8-2 15:36 -0500:
>    Dieter> I could only imagine that the transaction you commit is not the
>    Dieter> transaction the modifications are registered with.
>
>    Dieter> This could, e.g., happen when you modify the objects in a thread
>    Dieter> different from where the transaction is committed (the default
>    Dieter> transaction manager manages a transaction per thread).  However,
>    Dieter> you code does not give a hint that this is indeed the problem.
>
>That's not the case here.  Some SpamBayes apps use threads, but my
>train-to-exhaustion script does not.

Then, you might want to debug what happens.

  The basic operation is as follows:

    When you modify a persistent object that was not yet registered
    with the connection, the connection's "register" method is called.

    "register" registers the connection with the (current) transaction
    as a "ResourceManager"
    (if not already done) and then registers the object with the connection.

    An object already registered with the connection has
    "obj._p_changed == 1".

    When the transaction commits, it commits all its registered
    ResourceManagers which in turn commit all their registered objects.



-- 
Dieter


More information about the ZODB-Dev mailing list