[ZODB-Dev] POSKeyError tracing

2005-11-17 Thread Paolo Linux

Hi all,
we've developed an application developed using
ZODB 3.5.1. The load has recently grown up considerably
and we're starting getting POSKeyErrors...

We've never used undoing, so that cannot be the cause.

I suspect that in some cases we do not manage Conflict
Error (we retry for 3 times but then we give up...).
Could this be connected with POSKeyErrors?

I cannot reproduce easily the problem so I'd like to know
if there are suggestions in order to understand and
track down what's happening..

Thanks!
Paolo
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


Re: [ZODB-Dev] PersistentMapping

2005-11-17 Thread Jeremy Hylton
On 11/17/05, Thomas Lotze [EMAIL PROTECTED] wrote:
 Hi,

 I just noticed two things about persistent.PersistentMapping:

 - It inherits from UserDict.UserDict. Is there any reason not to inherit
   from dict directly, given that this has been possible since Python 2.3
   IIRC?

It has been possible to inherit from dictionary since Python 2.2, but
it is not possible for a persistent object and it would not do what
you expect even if it were possible.  A persistent object has a custom
C layout and so does dict, so it is not possible to have them both as
base classes.  (TypeError: multiple bases have instance lay-out
conflict.  (I don't know why there is a hypen in lay-out.))  If it
were possible, it wouldn't work anyway.  If you inherit from dict and
override its builtin methods, like __setitem__, your overridden method
will be ignored by C code using methods like PyDict_SetItem().

 - Not all methods of the mapping interface are handled. In particular,
   there's no reason not to handle pop() as popitems() is handled.
   Unhandled methods that change the content of the dict lead to especially
   nasty bugs as they seem to work OK during a transaction while their
   effect is not permanent.

On the other hand, I think that this omission is just an oversight. 
It would probably be a good idea to change PersistentDict/Mapping to
use the DictMixin instead of UserDict.

Jeremy
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


RE: [ZODB-Dev] custom mount point container type

2005-11-17 Thread Tim Peters
[Jim Fulton]
 Please note that this is the wrong list for this discussion. The
 ZODBMountPoint thing is in Zope.

 I will note though that before doing anything new in this area, you
 should take a look at the multi-database support in ZODB 3.5 and later.

Also look at the current Zope(2) trunk and 2.9 branch, where Chris McDonough
has reworked Zope2's mount point logic to _use_ recent ZODBs' multi-database
support.  I think he'll testify it's cleaner this way ;-).

___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev