List:General Discussion« Previous MessageNext Message »
From:Jeremy Cole Date:May 19 2006 10:06pm
Subject:Re: aha! replication breaking due to duplicate queries
View as plain text  
Hi Sheeri,

> So I've seen replication break a few times due to duplicate queries.
> A few times it was around a server crashing, but I thought perhaps it
> was because of the crash.  (ie, master sends a query, crashes, and
> then tries to send the query again when it comes back up).
> 
> But in the past 16 hours, it's happened twice.  Both times, no crash.
> No network problems that we know of.  No other query problems.
> 
> Therefore, we've deduced it's in the code -- it's trying to insert a
> field with a duplicate primary key.  I've sent that off to the
> developers, who will hit things with sticks.
> 
> However, why does MySQL transfer over DML queries that fail?  If they
> have an error, shouldn't they not replicate?  This seems like a very
> large bug to me.

It shouldn't, except in *very* limited circumstances (where you've 
already shot yourself in the foot a few times, generally).

I have seen a case quite a few times where the slave "hiccups" and 
apparently runs the same query twice.  Is it possible that this is what 
you're seeing?

Is your system replicating a mix of large (images, maybe) and small 
(single-row) updates?

Regards,

Jeremy

-- 
Jeremy Cole
MySQL Geek, Yahoo! Inc.
Desk: 408 349 5104
Thread
aha! replication breaking due to duplicate queriessheeri kritzer19 May
  • Re: aha! replication breaking due to duplicate queriesKishore Jalleda19 May
  • Re: aha! replication breaking due to duplicate queriesJeremy Cole20 May
    • Re: aha! replication breaking due to duplicate queriessheeri kritzer22 May
      • Re: aha! replication breaking due to duplicate queriesbalaraju mandala23 May