FLORAC Thierry wrote at 2004-1-21 11:57 +0100:
I currently use a BTreeFolder2 inherited class, called "users", to store my site users profiles. My problem is that for a few records (~50 for 5700 users), I have duplicated keys in my folder, pointing to the same record ; if I remove one of these records, the other keys stay into the folder, pointing to nothing !!
I think this should not happen... The BTrees expert is Tim Peters and he listens on "zodb-dev@zope.org". Check the validity of the "_tree" attribute in your "BTreeFolder2". There are several checks in the "BTrees" package. It is quite easy to corrupt a BTree when you add keys without persistent order (e.g. because they are mutable).
My questions now are : - how can I avoid these duplicated keys (as long as I only add my users profiles via a simple Python script which shouldn't break keys, with :
Read Tim's messages about "BTrees" and its key requirements (--> "zodb-dev@zope.org"). -- Dieter