• Barry Warsaw's avatar
    Extend iterator() to include hint about "backpointers", or in Berkeley · 41ec2d75
    Barry Warsaw authored
    storage speak, lrevid pointers to shared pickle data in earlier
    transactions.
    
    Specifically,
    
    The _Record object now has a data_txn attribute that is either None or
    the id of the transaction that contains the data used by the current
    record.  Example: When transactionalUndo() modifies an object, it
    typical creates a new data record that points at the transaction
    before the undo.  The new record contains the same logical data as the
    record it refers to.  (For consistency purposes, this is a stronger
    claim than that the pickles in two different data records are the
    same.)
    
    _Record.__init__(): Gets data_txn passed in from
    _RecordIterator.__getitem__(), which in turn getes the lrevid from
    Full._loadSerialEx().
    
    _loadSerialEx(): Now returns the backpointer, aka lrevid but only if
    it is not the same as the serial argument.  They will always be the
    same (and we'll always return None) except in the face of
    transactionalUndo, commitVersion, and abortVersion.
    41ec2d75
BDBFullStorage.py 70 KB