Re: Packing, again
Richard Waid <[email protected]>
| Newsgroups | gmane.comp.web.zope.zodb.dirstorage |
|---|---|
| Organization | IOPEN Technologies Ltd. |
| Message-ID | <[email protected]> |
On Thu, 2004-09-02 at 05:41 +0100, Toby Dickenson wrote: > On Thursday 02 Sep 2004 04:35, Richard Waid wrote: > > > Preparing local storage.... > > Fetching increment.... > > ReplicaError: storage has been packed since the last replica > > ( 2004-05-26 13:02:55 GMT > 2004-05-26 11:10:20 GMT ) > > ReplicaError: Error from remote replica > > Thats strange.... are your clocks wrong? this is saying that the master > storage was most recently packed at 2004-05-26 13:02:55, and the most recent > transaction on the replica is from 2004-05-26 11:10:20 GMT. Right, the replica stopped updating for a couple of hours while the packing was proceeding. > The normal solution to this problem is to keep 'enough' days of history on the > master. when packing, dont choose "0 days". Ah, ok, I'll try that next time. > > (in which case, the rsync might simply be quicker anyway). > > Your solution has less redundancy..... Suppose something happens to corrupt > one old file. Your solution will copy the corrupt version onto the replica at > the next rsync operation, and (I assume) delete the only good one. That's true. > If you only replicate using the replica tool, then all data on the replica is > sure to be the authentic version from the first replication event after the > data was first created. I guess I don't need to pack using a live Zope anyway -- I could load the Zope object and pack it directly. Your plan sounds like a good solution. > Also beware that a naive implementation of your tar+rsync+untar solution will > not be atomic. If something crashes half way through your untar operation > then your replica will not be self-consistent. If you have scripts that > defend against this type of problem then I would be keen to include them in > the DirectoryStorage distribution. If something crashes part-way through the untar operation I'd assume that my replica was screwed anyway. It's not a hot replica, it's an offline replica (more of a transaction-by-transaction backup). --Richard ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click