Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: [patch 5/5] Add tests for WL3127 slave side TCP address binding

From: Stewart Smith <stewart(at)mysql.com>
Date: Wed Oct 10 2007 - 04:18:35 EDT


On Tue, 2007-10-09 at 09:32 +0200, Kristian Nielsen wrote:
> stewart@mysql.com writes:
>
> > +change master to master_bind='1.1.1.1';
> > +connection master;
> > +insert into t1 values (3);
> > +save_master_pos;
> > +connection slave;
> > +start slave;
> > +--real_sleep 1 # wait for I/O thread to try connection
>
> It is almost always wrong to use sleep in test cases (because of race
> conditions). But in this case I think it will work. Since, the race is that if
> the connection _does not_ fail (==bug), the test may or may not fail depending
> on timing. If the code works, there is no race.
>
> So should work, but please add a comment explaining this (ie. explain why the
> race condition will not cause random failures if the feature is correctly
> implemented).

I think to really have this work we need a "connect timeout" for client/rpl connections (like we do for mgmapi in ndb) and a way to wait for it to expire (or an error) so we could write it properly.

i.e. I'd actually call this test case buggy... but the fix is larger (and I think it's on a NRE list somewhere) and (again) involves changes to the output of SHOW SLAVE STATUS (which there is about no way in hell I'm ever touching that again... It turns out I don't totally hate myself).

So I'm tempted to open a bug... with a depends on WLXXXX... oh wait... there's no neat way to specify that :(

-- 
Stewart Smith, Senior Software Engineer
MySQL AB, www.mysql.com
Office: +14082136540 Ext: 6616
VoIP: 6616@sip.us.mysql.com
Mobile: +61 4 3 8844 332

Jumpstart your cluster:
http://www.mysql.com/consulting/packaged/cluster.html
Received on Wed Oct 10 04:18:31 2007

This archive was generated by hypermail 2.1.8 : Thu Jul 03 2008 - 09:38:55 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library