[ZODB-Dev] Different commit protocols

Wolfgang Schnerring wosc at wosc.de
Fri Sep 22 07:51:24 EDT 2006


Hi,

I'm working with Theuni on the BlobStorage, and am trying to understand the
different 2-Phase-Commit protocols that are in use in ZODB at the same time.
As I understand it, tpc_* is the old protocol, and prepare/commit is the new
protocol.

The sequence in Transaction._commitResources is
  tpc_begin      (ignored by DataManagerAdapter)
  commit         (ignored)
  tpc_vote       (translated to prepare)
  tpc_finish     (translated to commit)

Which means, the old protocol is completed first, before the new protocol is
even started.

Now, Connection uses the old protocol, and we've got a BlobDataManager that uses
the new protocol. The BlobDataManager needs to do work during prepare, but it is
only called to do this work *after* the Connection has already committed.
Needless to say, the commit fails, because the preparation hasn't been done.

Maybe I misunderstood the protocol and the preparation work should be handled
differently. In any case I'm rather confused by this double-protocal situation
and would be grateful if someone enlightened me here.

Thanks,
Wolfgang



More information about the ZODB-Dev mailing list