On Mon, Jun 30, 2014 at 7:21 AM, Simone Deponti
<simone.depo...@abstract.it> wrote:
> Hi Jim,
> On Mon, Jun 30, 2014 at 12:43 PM, Jim Fulton <j...@zope.com> wrote:
>> As the comment suggests, if you continued packing, the new file
>> would be as large as the old one, because no records would be
>> removed.  This is likely either because a) you've already packed to
>> that pack time before, or b) None of the objects written up to the pack time
>> have been written after the pack time and this there are no old records
>> to be removed.
> Therefore, if I get it right, what happens is:
> * All transactions prior to the packing time are scanned to see if
> they contain reachable data,

Not right.

- First, it does a scan to determine which records are current
  as of the pack time.  This has nothing to do with reachability or
  or GC.  If an object is modified, then a new record is written and becomes
  current.  Packing (before or without GC simply removes (or more precicely
  copies) current records.

- It copies current records to pack files.

If it determines that all records have been copied, then
it stops, as there's no purpose in proceeding.

> if they do, they are kept. Therefore the
> condition there checks that, if we have reached the pack time (after
> which, all transactions are copied over anyway) and none has been
> detected as "deletable", then it doesn't make sense to go on packing.
> * If pack-gc is on, then all the transaction prior to pack time that
> have been kept are purged of unreachable objects

GC doesn't have anything directly to do with pack time.
GC removed objects that are no longer reachable from
the root from any records surviving a pack.


Jim Fulton
For more information about ZODB, see http://zodb.org/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to