From: <da...@ha...> - 2013-12-20 07:59:10
|
On 2013-12-20 00:12, Michael Ludvig wrote: > Why don't we do INSERT IGNORE ... to prevent the duplicate key error? > It's probably only a timing issue, the pre-existing record would > eventually propagate from the master to the slave over time so it's not > a problem if we can't insert it again. Beside Karls point, of it being a MySQL specific option, theres another good reason not to do this; It doesn't happen in my setup and this is the first time anyone has reported this. So it would seem that this isnt a normal thing and the error might actually mean that something is wrong in the mysql setup. Using ignore would cause one to miss a possible serious problem. Also, the error simply causes sqlgrey to reconnect to the sqlserver which is very low cost, even if it happened more than once per minute. If it turns out that this is normal behavior that we need to account for, we could simply have sqlgrey ignore 'duplicate key' errors on insert, when db_host != read_host. But i doubt this is the case. > One other thing - could the index be corrupted? The index may think the > record is there while in fact it isn't. Thats actually a really good suggestion.. I've seen all sorts of odd behavior from broken myisam indicies.. @Marc - http://dev.mysql.com/doc/refman/5.1/en/myisam-repair.html - perhaps something will show up :). > Michael > > > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > _______________________________________________ > Sqlgrey-users mailing list > Sql...@li... > https://lists.sourceforge.net/lists/listinfo/sqlgrey-users |