[ZODB-Dev] Re: [Zope-Checkins] CVS:ZODB3/ZODB/FileStorage -fspack.py:1.3

Dieter Maurer dieter at handshake.de
Tue Jan 20 15:13:16 EST 2004


Tim Peters wrote at 2004-1-19 15:51 -0500:
>[John Belmonte]
>> Is "no changes have been made since the last pack" really an error in
>> the first place?
> ...
>If I'm packing because I expect to reduce file
>size, then yes, it's exceptional to me if my attempt won't accomplish
>anything.

But, then the current pack code is not consistent:

        if ipos == opos:
            # pack didn't free any data.  there's no point in continuing.
            self._tfile.close()
            os.remove(self._name + ".pack")
            return None

To make it consistent, it would need to raise an exception
similar to the one raise for a redundant pack.


I do *NOT* think that a pack that happens not to pack anything
is an application error:

  We pack all our ZODB storages periodically (automatically).
  It is not an error when nothing relevant has changed
  between two periodic pack operations.

-- 
Dieter



More information about the ZODB-Dev mailing list