-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Joachim Schmitz wrote:
> Tres Seaver schrieb:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Not if the sessions being used are from 'faster' -- it doesn't use
>> IOBTree.  The major "application" use of that module is in the catalog.
>>
> you correct see below:
> 
>> Try dumping out the contents of the bucket:
>>
>>   for k, v in bucket.items():
>>       print k, type(v)
> 
> resolve <built-in method _p_resolveConflict of BTrees._IOBTree.IOBucket 
> object at 0xb1ab82b4>
> 
> print root._p_jar[p64(0xb1ab82b4)]
> *** POSKeyError: <ZODB.POSException.POSKeyError instance at 0xa8f9e6cc>
> 
> with the recepies here http://www.zopelabs.com/cookbook/1114086617
> I was able to get the information about the oid, which is passed to
> tryToResolveConflict, here is the result
> 
> <BTrees._IOBTree.IOBTree object at 0xb562fadc>
> <DateIndex at created>
> <Products.ZCatalog.Catalog.Catalog object at 0xb12d622c>
> <CatalogTool at portal_catalog>
> <CPSDefaultSite at uniben>
> <Application at >
> {'Application': <Application at >, 'ZGlobals': <BTrees._OOBTree.OOBTree 
> object at 0xb2739224>}
> 
> What does this tell us ?

That is a "real" conflict:  both transactions have inserted values into
the 'created' date index's '_index'  under the same key, which can't be
resolved.  Retrying the transaction is the only choice here.

Because DateIndexes convert the indexed value to an integer with
precision of one minute, a date index on 'created' is fairly likely to
generate such conflicts when two parties both create content at the same
time.

Ideally, one would examine the two values being inserted, note that they
were both IITreeSet instances containing one int apiece, and exploit our
knowledge of the application semantics to merge them, removing the
conflict;   however, *because* they are IITreeSets, and therefore
separate persistent objects, their state is not available to the
bucket's '_p_resolveConflict', which must therefore lose.


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGYBDQ+gerLs4ltQ4RAoRNAKCb86Bjhp5fuk7bp9OV2IMUXDKm7ACeO/aH
hVfzx/U0rXsM3iNT2fOl2As=
=egtx
-----END PGP SIGNATURE-----
_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to