[ZODB-Dev] RelStorage, history-free, pack causes POSKeyError with BTreeFolder2
    Shane Hathaway 
    shane at hathawaymix.org
       
    Fri Jan 28 19:40:55 EST 2011
    
    
  
On 01/28/2011 05:34 AM, Chris Withers wrote:
> bin/generate --zap --folder_depth 3
>
> Leave it running for a minute or two, and then in another do:
>
> bin/zodbpack pack.conf
Thanks to this test, I found a serious flaw in the history-free variant 
of packing.  Currently, the history-free and history-preserving variants 
share the fill_object_refs() method, which assumes that it's possible to 
enumerate the references from all objects in a specific transaction. 
However, that assumption is only correct in the history-preserving 
variant.  In history-free storages, object states disappear every time 
they are replaced by a newer version, causing fill_object_refs() to 
think the replaced objects have no references.  That mistake leads to 
garbage collection of too many objects.
I'm surprised that existing tests did not reveal this.  Until I release 
a fix, I recommend not packing history-free databases.
Shane
    
    
More information about the ZODB-Dev
mailing list