On Wed, 29 Jul 2009 14:02:32 +0200, Paul McCullagh <[email protected]> wrote: > On Jul 24, 2009, at 6:30 PM, Alex Yurchenko wrote: > >> And why specifically "asynchronous"? I'd dare to claim that the same >> interface can accommodate both asynchronous and synchronous modes. >> Isn't it >> just a matter of when you return form the replication call? > > Mostly yes, but due to the fact that many operations make up a > transaction, to do synchronous replication you have to send > uncommitted data. > > So the slave also needs to be able to handle a replicated rollback > command.
Yeah this is something I have overlooked but it is more about multi-master vs. master-slave rather than about synchronous/asynchronous. In a master-slave setup, when the client sends COMMIT no rollbacks can (normally?) happen any more: all resources have been acquired and commit should be guaranteed. So at this point it should be perfectly safe to replicate the yet uncommitted transaction whether synchronously or asynchronously. Some people here even aspire higher concurrency through replication of incomplete transactions in advance, and in that case you might need a replicated rollback command, but it is trivial to implement anyway. The point here is that in master-slave you are NOT restricted to replication of only committed data, and there is no real reason to do so. Multi-master is a more complicated story, but at least in a certification-based replication that Codership develops we ARE restricted to pre-commit replication. So while replication of already committed data can serve (to the best of my knowledge) only for master-slave, replication of uncommitted data can facilitate all sorts of replication models. What I'm getting at is that it'd be a shame if Drizzle ends up having different code and execution paths for what is essentially the same operation. Asynchronous or synchronous should be a matter replication/logger plugin implementation. > > -- > Paul McCullagh > PrimeBase Technologies > www.primebase.org > www.blobstreaming.org > pbxt.blogspot.com -- Alexey Yurchenko, Codership Oy, www.codership.com Skype: alexey.yurchenko, Phone: +358-400-516-011 _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

