<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: How MySQL replication got out of sync</title>
	<atom:link href="http://www.xaprb.com/blog/2007/11/08/how-mysql-replication-got-out-of-sync/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xaprb.com/blog/2007/11/08/how-mysql-replication-got-out-of-sync/</link>
	<description>Stay curious!</description>
	<pubDate>Fri, 21 Nov 2008 05:54:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: yingkuan</title>
		<link>http://www.xaprb.com/blog/2007/11/08/how-mysql-replication-got-out-of-sync/#comment-14182</link>
		<dc:creator>yingkuan</dc:creator>
		<pubDate>Tue, 22 Jan 2008 04:19:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/2007/11/08/how-mysql-replication-got-out-of-sync/#comment-14182</guid>
		<description>actually from a presentation of Youtube team, I learnt slaves of Mysql Replication are doomed to lag of master because replication is asynchronous and serialized.

updates on master is concurrent and while user doing one big update on table A, other user can do updates on table B for example.

when replicating, the update is serialized, 
For slave it read the statement from binlog in the form of

update on tableA;
update on tableB;
....

update on tableB will not run until slave finish big update on tableA.

This seems to be trivial on small database, but for database driven website like youtube and other web2.0 site, this will cause serious problems. That's why they will go horizontal partition route.</description>
		<content:encoded><![CDATA[<p>actually from a presentation of Youtube team, I learnt slaves of Mysql Replication are doomed to lag of master because replication is asynchronous and serialized.</p>
<p>updates on master is concurrent and while user doing one big update on table A, other user can do updates on table B for example.</p>
<p>when replicating, the update is serialized,<br />
For slave it read the statement from binlog in the form of</p>
<p>update on tableA;<br />
update on tableB;<br />
&#8230;.</p>
<p>update on tableB will not run until slave finish big update on tableA.</p>
<p>This seems to be trivial on small database, but for database driven website like youtube and other web2.0 site, this will cause serious problems. That&#8217;s why they will go horizontal partition route.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diamond Notes &#187; A Long Time Coming</title>
		<link>http://www.xaprb.com/blog/2007/11/08/how-mysql-replication-got-out-of-sync/#comment-13696</link>
		<dc:creator>Diamond Notes &#187; A Long Time Coming</dc:creator>
		<pubDate>Tue, 20 Nov 2007 15:18:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/2007/11/08/how-mysql-replication-got-out-of-sync/#comment-13696</guid>
		<description>[...] http://www.xaprb.com/blog/2007/11/08/how-mysql-replication-got-out-of-sync/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.xaprb.com/blog/2007/11/08/how-mysql-replication-got-out-of-sync/" rel="nofollow" >http://www.xaprb.com/blog/2007/11/08/how-mysql-replication-got-out-of-sync/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2007/11/08/how-mysql-replication-got-out-of-sync/#comment-13661</link>
		<dc:creator>Xaprb</dc:creator>
		<pubDate>Fri, 09 Nov 2007 12:33:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/2007/11/08/how-mysql-replication-got-out-of-sync/#comment-13661</guid>
		<description>Jeremy, that's a good point.  It never occurred to me.

safari, deadlocks are a fact of life in transactional systems; you can sometimes avoid them by making the different processes read the same index in the same direction, but it's usually pretty hard to do.  Better just build the application to detect and retry the work.</description>
		<content:encoded><![CDATA[<p>Jeremy, that&#8217;s a good point.  It never occurred to me.</p>
<p>safari, deadlocks are a fact of life in transactional systems; you can sometimes avoid them by making the different processes read the same index in the same direction, but it&#8217;s usually pretty hard to do.  Better just build the application to detect and retry the work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Toba</title>
		<link>http://www.xaprb.com/blog/2007/11/08/how-mysql-replication-got-out-of-sync/#comment-13660</link>
		<dc:creator>Toba</dc:creator>
		<pubDate>Fri, 09 Nov 2007 05:27:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/2007/11/08/how-mysql-replication-got-out-of-sync/#comment-13660</guid>
		<description>Good that you find your bug, that's really not something you can spot easily. We have been running replication over 6 years now, and afaik we have never hit that bug/feature. :) But I guess we don't do much updates/deletes with ORDER BY and LIMIT in it. For us, now days out of sync replication is much more rare than it was before (say 3.23 or 4.0).</description>
		<content:encoded><![CDATA[<p>Good that you find your bug, that&#8217;s really not something you can spot easily. We have been running replication over 6 years now, and afaik we have never hit that bug/feature. :) But I guess we don&#8217;t do much updates/deletes with ORDER BY and LIMIT in it. For us, now days out of sync replication is much more rare than it was before (say 3.23 or 4.0).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: safari</title>
		<link>http://www.xaprb.com/blog/2007/11/08/how-mysql-replication-got-out-of-sync/#comment-13659</link>
		<dc:creator>safari</dc:creator>
		<pubDate>Fri, 09 Nov 2007 04:11:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.xaprb.com/blog/2007/11/08/how-mysql-replication-got-out-of-sync/#comment-13659</guid>
		<description>How about the deadlock I reported? Is there any way to get rid of it?</description>
		<content:encoded><![CDATA[<p>How about the deadlock I reported? Is there any way to get rid of it?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
