[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

elimination on disk.



Abstract:  Here's the current set of deletion operations for
persistent objects.

To ignore the deletion issues in memory, I try to use the generic
'eliminate' for in-core operations.

forget - The application calls this when there are no more
*persistent* references to the on-disk object.  This means that the
in-core representation of the object is the only reason for it to
continue to exist.  When that in-core representation is eliminated
(through explicit deletion, garbage collection, whatever), the system
will remove the representation of the object from the disk as well as
from memory.

remember - The application calls this when it gets or discovers a new
persistent pointer to a persistent object.  Now if the in-core
representation of the object is eliminated, the disk representation
should remain, and the semantics of the object should not be disturbed
(for instance, a persistent Stamp removed from memory (but not from
disk) should not have its endorsements removed from the ent).

dismantle - remove the persistent manifestation of the object, and
disconnects the object from other structures, both on disk and in
core.  The remaining in-core object is junk, but not yet deallocated
(responsibility for that lies elsewhere).  this is the persistent
object equivalent to the destructor.  Application code implements it,
but doesn't call it.

dismantleIfForgotten - this is only called from destructors:
dismantle the object only if it has been forgotten.  Only this calls
dismantle. 

An important note: The full persistent object will only be junk
(eliminated from memory, removed from the disk, and thrown to the
dogs) if the object has *both* been forgotten and eliminated from
memory.  Otherwise the persistent representation of the object will
remain.  Forgotten ojbects that still have an in-core representation
are logged in the RestHome (where objects go while they wait to die!).
If the system crashes, upon reboot, the backend clears out all the
objects in the rest home (because the core object that was their
life-support burned in the crash).

next: elimination in memory....

dean & markm