Re: non-undoable storage using directorystorage?
Toby Dickenson <[email protected]>
| Newsgroups | gmane.comp.web.zope.zodb.dirstorage |
|---|---|
| Message-ID | <[email protected]> |
On Tuesday 23 November 2004 19:59, Tim Hicks wrote: > In thinking about all this, I realised that I still haven't quite groked > what needs to be changed to make Full._pack work as Minimal._pack. All we > are trying to achieve is getting rid of 'deleted' objects from the > database. I mean: > > 1) Full._pack will currently remove any file (containing a pickle) that is > not referenced by any other object and is therefore unreachable from the > root object. These are the 'deleted' objects right? This seems to be > what we want for Minimal._pack. > > 2) Full._pack will search back for previous revisions, but would > presumably not find any for a Minimal storage, so that would be harmless. > > So why can't I just do the following in the Minimal.Minimal class > declaration and be done with?:: > > _pack = Full._pack For the same reason that it is not possible to take data files creates using a Full storage and access them using Minimal, hoping to only see the current revisions of everything.... Minimal is a subset of Full in functionality, but it is *not* a subset of its implementation or disk layout. Some examples: The file layout for object data is different. For each object: * Minimal has one file only. * Full has one 8 byte file defining the current revision number, plus one file per revision holding the real data. None of these files have the same filename as Minimal's one. Full stores a log of transaction metadata, but Minimal does not. Full's packing code: * will raise errors if the log does not exist. * (pass 2b) makes use of this log to work around some corner cases in ZODB that can lead to data loss. * Ensures that it preseves enough of this log for use in replication. > Sorry, I think I'm being a bit slow. I suggest: 1. create a small Minimal storage using the 'flat' format, containing a few objects and a few transactions. Pick apart by hand the directory structure and file content. 2. do the same for Full. 3. dont hesitate to ask questions. -- Toby Dickenson ____________________ Important Notice: This email and any attachments are confidential and may contain trade secrets or be legally privileged. If you have received this email in error you must not use, rely upon, disclose, copy or distribute the contents. Please reply to the sender so that proper delivery can be arranged and delete the email from your computer. Gemini Data Loggers monitor incoming and outgoing email to ensure satisfactory customer service, maintain company security and prevent abuse of their email system. However, any views expressed in this email are not necessarily those of Gemini and Gemini cannot be held responsible for the content. Gemini makes best efforts to ensure emails are virus free; however you are advised to carry out your own checks. Gemini does not accept responsibility for any damage resulting from email viruses. ____________________ ------------------------------------------------------- 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/