A few brief comments on this one... (1) "Multi-threaded would probably cause thousands of problems" Well, not necessarily.
Currently, the slave reads transaction A from the relay log, executes its actions, commits it, then reads transaction B, executes and commits. It wouldn't be unreasonable to allow the two transactions to execute on different threads, provided that (a) B can't commit until A does and (b) in case of deadlock, B is rolled back and re-executed, rather than A. "Small matter of programming," but not necessarily intractable. (2) If replication is being used for backup, a transaction on the master is backed up as soon as it has been copied to the relay log. A delay in executing the relay log isn't a problem unless either (a) you are doing queries against the slave and need timely data or (b) such delays are so frequent that the slave can never catch up. (3) In the original post, the problem was that during 12 minutes to create an index on the slave, other transactions can be locked out. Presumably, on the master, shared locks are set on every row of the table as the ALTER TABLE is run, so it is certainly possible that updates to the table can be delayed or that a deadlock can happen on the master, as well. ===== Original message follows ===== Date: Fri, 13 Aug 2004 14:42:28 -0700 From: Jeremy Zawodny <[EMAIL PROTECTED]> To: Donny Simonton <[EMAIL PROTECTED]> Cc: "'Batara Kesuma'" <[EMAIL PROTECTED]>, [EMAIL PROTECTED] Subject: Re: Replication blocked On Fri, Aug 13, 2004 at 01:19:14AM -0500, Donny Simonton wrote: > > There is only one thread for replication on the slave. It does one > step a time. If you use mysqlbinlog on one of your binary files on > your master, you will see exactly how it all works. No, there are 2 threads: the IO (or relay) thread, and the SQL thread. > Multi-threaded would probably cause thousands of problems. Unless > it was threaded per table, but that would still cause problems > because of multi-table deletes and updates. Agreed. Jeremy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]