[Zope-CMF] Re: cmfuid

Gregoire Weber gregweb at gmx.ch
Mon Nov 22 11:31:54 EST 2004


Hi Chris,

>> As I'm not so deep into ZODB I can't say anything about read conflicts.
>
>Read conflicts were added late in ZODB's history after someone noticed
>that if you read data from an object that had been invalidated in one
>transaction and wrote that data into another object in the course of
>another transaction, data inconsistencies could occur.  Read conflicts
>cannot be resolved unless you're using MVCC, which is only present in
>ZODB 3.3 (Zope 2.8 and 3).  MVCC's primary job is to prevent read
>conflicts.
> 
>> My advice is to just replace 'portal_uidgenerator' with your own UID 
>> or UUID generator implementation.
>
>We should probably fix the default one because it doesn't guarantee
>uniqueness of ids.  The simplest fix would be to not use a Length object
>as the counter but to use a subclass of Length that returned false from
>its _p_independent method.  This would probably work for most people,
>although probably not very well for applications that generated lots of
>uids simultaneously.

Ok, I understand the issue in general. But in this case BTree-Length does 
a read of 'value' and tries to write to the same 'value' attribute after
having incremented it. No other variables are used to calculate the result 
than 'value'. So shouldn't read conflicts be tracked by the write conflicts
anyway?

I'm not the ZODB expert here, so I probably miss some point. Based on
my deep experience in C based real time system software I don't see a 
problem.

Reading the comment of '_p_independent', I see there may be a problem,
but I don't understand it really.

May you explain or somebody different? E.g. Tres?

If there is a real problem I would appreciate we correct the issue/bug.


>> By the way: It would be cool if someone could implement <http://www.ietf.org/internet-drafts/draft-mealling-uuid-urn-03.txt> (hint, hint!). Actually I think this should be a python lib ...
>
>I have the beginnings of such a thing at
>http://www.plope.com/software/uuidgen/view .  Not really, because it
>doesn't follow the string formatting rules of the spec and it only does
>"Version 4" UUIDs (without a version bit set) but I guess it's a start.

Does ist work also under Win32?

I would propose here (after having corrected the counter issue) to add 
a new generator tool which users can use to replace the standard one.

Gregoire



More information about the Zope-CMF mailing list