[ZODB-Dev] FileStorage pack screwy.

Chris McDonough chrism@zope.com
Thu, 01 Nov 2001 00:52:22 -0500


Hmm... weird.

I'm not sure what version of FileStorage you're using so I dont know 
what line 1462 is; the truth is, however, it really doesn't matter much 
because I'm not even going to pretend to try to decipher the 400-line 
pack method of FileStorage.  ;-)  Sorry.  Maybe somebody else can help here.

The best I can suggest is to copy the file and open it in a separate 
FileStorage (perhaps a more recent version?), and try to perform a pack 
manually from within it, ala:

import ZODB
from ZODB import FileStorage, DB
fs = FileStorage('Data.fs.copy')
db = DB(fs)
db.pack()

I have no concrete expectation that this will produce a different 
result, but it's sadly the best thing I can think of at the moment.  :-(


- C


Andrew Sydelko wrote:
> Chris McDonough wrote:
> 
>>>I called it on a ClientStorage and then watched the StorageServer.
>>>After using lots of CPU, it started spitting out a Data.fs.pack and
>>>then after a while it stopped growing. And now it just sits there
>>>
>>still
>>
>>>using the old database (before packing).
>>>
>>Was a Data.fs.old created on the storage server?  Are you sure it's
>>still using the old database?
>>
>>If so, are there any errors in the ZEO event log?
>>
> 
> Aha! There is a problem. But I would have _no_ idea how
> to fix it:
> 
> 2001-10-31T23:11:27 TRACE(-300) ZEO Server message_input 4259856
> '(U\x04packGA\xcd\xdc|_/\x1d\x04K\x00t.'
> ------
> 2001-10-31T23:11:27 TRACE(-300) ZEO Server call 4259856:
> pack(1001978046.368073, 0)
> ------
> 2001-10-31T23:11:27 TRACE(-300) ZEO Server 4259856 R: None
> ------
> 2001-10-31T23:11:27 BLATHER(-100) ZEO Server pack begin
> ------
> 2001-10-31T23:11:27 TRACE(-300) ZEO Server message_output 'RN.'
> ------
> 2001-10-31T23:20:51 ERROR(200) ZEO Server Pack failed for 1
> Traceback (innermost last):
>   File /data/www/Zope.4/Zope/lib/python/ZEO/StorageServer.py, line 391,
> in _pack
>   File
> /data/www/Zope.4/src/Zope-2.4.2-src/lib/python/ZODB/FileStorage.py, line
> 1462, in pack
>     (Object: /data/www/Zope.4/Zope/var/Data.fs)
> KeyError: ^@^@^@^@^@    EV
> 
> 
> ------
> 
> 
> So, what to do, what to do? I'm about ready to create a new
> database, it's just that I don't what the system down for such
> a long period as I export and re-import each object in the root.
> 
> --andy.
> 
> _______________________________________________
> For more information about ZODB, see the ZODB Wiki:
> http://www.zope.org/Wikis/ZODB/
> 
> ZODB-Dev mailing list  -  ZODB-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zodb-dev
> 


-- 
Chris McDonough                    Zope Corporation
http://www.zope.org             http://www.zope.com
"Killing hundreds of birds with thousands of stones"