[Zope-dev] How to report stuff with the collector down?
Lennart Regebro
lennart@regebro.nu
Tue, 16 Oct 2001 22:22:06 +0200
Hi all!
I tried to figure out how to report bugs and stuff without the collector,
but couldn't find anything. Any official way?
Anyway, I found this minor bug in FileStorage.py. If you try to pack a db
with a packdate that is earlier than the date of the first object in the
database, you get a "Errno 22, Invalid argument" error. This is because
read_index bails out already at the first object and returns position 4L.
Whe _reduntant_pack then tries to seek(-8) it of course fails. Now, I
haven't tried tha absolute latest versions of Zope, but a check in the CVS
indicated that the problem is still there.
I chenged this part of FileStorage.py (row 1275 in v1.71.2.3):
packpos, maxoid, ltid = read_index(
file, name, index, vindex, tindex, stop,
read_only=1,
)
if self._redundant_pack(file, packpos):
raise FileStorageError, (
'The database has already been packed to a later time\n'
'or no changes have been made since the last pack')
to this:
packpos, maxoid, ltid = read_index(
file, name, index, vindex, tindex, stop,
read_only=1,
)
if packpos == 4L or self._redundant_pack(file, packpos):
raise FileStorageError, (
'The database has already been packed to a later time\n'
'or no changes have been made since the last pack')
Note the "if packpos == 4l or" part. This means that you get the message
that it's already packed.
I have also some other small "improvements" (on MailHost, f ex) that I'd
like to submit to the community.
Well, *I* think it's an improvement. :-)