[ZODB-Dev] zc.demostorage2 assumes too much?

Jim Fulton jim at zope.com
Tue Dec 15 12:02:13 EST 2009

On Thu, Nov 26, 2009 at 7:33 AM, Wolfgang Schnerring <ws at gocept.com> wrote:
> Hello,
> zc.demostorage2 assumes that the tpc_begin() of its underlying
> storages takes three parameters (transaction, tid, status), while both
> MappingStorage and IStorage only know about the first two.
> This strikes me as risky, and it does indeed break, for example when
> trying to use a DemoStorage as the 'changes' backend of a
> DemoStorage2.
> I've tried and removed the status parameter from zc.demostorage2 and
> its tests still pass, but I must confess I have no clue what this
> status parameter actually does, so I don't really know what (if
> anything) to do about this issue.

The tid and status parameters are used when copying already committed
transactions.  zc.demostprage2 should check whether tid is None
and only pass tid and status when it isn't.


Jim Fulton

More information about the ZODB-Dev mailing list