Re: non-undoable storage using directorystorage?

"Tim Hicks" <[email protected]>
Newsgroups gmane.comp.web.zope.zodb.dirstorage
Message-ID <[email protected]>
Discussion about adjusting Minimal.py to produce a workable non-undoing
storage.  dirstorage-users cc'd in...


Toby Dickenson said:
> On Friday 19 November 2004 12:39, Tim Hicks wrote:

> Sometimes renaming a file from transaction directory to storage directory
> will
> replace a pre-existing file of the same name.


[... which is how most of the non-undoing part gets done ...]
[... just need to implement proper pack to complete the functionality ...]


> More details at
> http://dirstorage.sourceforge.net/operation.html
>
>> I've had a look at Full.Full._pack, but seeing as I'm coming at this
>> almost completely new to ZODB and dirstorage, I'm not sure in which
>> places
>> Minimal needs adjustment to the Full.Full._pack to make things work.
>> Have
>> you got any pointers?
>
> A comment in _pack says:
>         # Reachable objects and transactions will be marked.
>         # An object is reachable if:
>         # 1. It is the root object
>         # 2. it is referenced by a sufficiently recent revision
>         #    of another object which is reachable. This catches
>         #    most objects
>         # 3. It was written in a sufficiently recent transaction.
>         #    This catches a few weird boundary cases, because
>         #    most objects are caught by 2.
>
> The 'marking' phase is all that needs to change. It doesnt need to loop
> over
> old revisions of objects because they only have one revision.


Ok, so would that involve writing an adjusted version of
_mark_reachable_objects or perhaps _mark_reachable_objects_impl?  I had a
look at those methods and... eek!  It all looks rather complicated and I
couldn't even figure out where the looping over the old revisions actually
happens.  Got any pointers?


tim

ps Is there a reason why there are two _mark_reachable_objects methods
declared on Full.Full?


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.