Re: Replication and cold failover

Paul Winkler <[email protected]>
Newsgroups gmane.comp.web.zope.zodb.dirstorage
Message-ID <[email protected]>
Thanks Toby, this is great stuff.

On Wed, Jul 27, 2005 at 04:55:12AM +0100, Toby Dickenson wrote:
> On Tuesday 26 Jul 2005 22:04, Paul Winkler wrote:
(snip)
> Another option is to configure the storage running on B during this failover 
> period to be read-only. B never holds any transactions that are not also 
> present on A, so this problem scenario never arises.
> 
> This is the only type of ZODB cold standby that I have used (using heartbeat 
> on linux)

OK, I'll bear that in mind, it might be an option.
 
(snip)
> b. Use the special failover-recovery mode of the DirectoryStorage replication 
> tool which does not raise an error in this scenario. It atomicly peels back 
> the doomed transactions on A (back to some common ancestor transaction) then 
> replicates as normal. This is fast - time proportional to the number of 
> outstanding transactions. Unfortunately this mode has not yet been 
> implemented ;-) Patches or sponsorship gratefully accepted.

Hmm. How long do you think it might take to implement, and what
sort of sponsorship would it take to get it done? Contact me
offlist if you like. I have no idea how hard it would be to get
this in the budget, but we're investigating all our options, so
it's worth a look.

(snip) 
> > * A replicates from B again to get the very latest transactions.  This
> >   should be fast. (Question: Can you replicate from a master storage
> >   that is not running a storage process? I don't see why not.)
> 
> yes, you can.

Great, thanks for confirming that.
 
(snip)
> Automatic preservation will be difficult. It will be worth saving the raw 
> pickle files of those doomed transactions just in case they contain some 
> critical information which justifies a manual salvage process.

That doesn't sound fun...
 
(snip)
> The replication tool ignores "old history".

Ahh, that's great to know.
 
> > (Which leads to a more general question:  How can I pack my replicas?
> > I don't want 'em to just keep growing forever.)
> 
> import sys
> from DirectoryStorage.Full import Full
> from DirectoryStorage.Filesystem import Filesystem
> from DirectoryStorage.utils import storage_pack_days
> f = Filesystem(sys.argv[1])
> s = Full(f,synchronous=True)
> storage_pack_days(s,30)
> s.close()

Nice :-)

-- 

Paul Winkler
http://www.slinkp.com


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
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.