Bug #58195 Make mysqltest poll for next epoch more often
Submitted: 15 Nov 2010 9:46 Modified: 7 Dec 2010 12:54
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version:5.5 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any
Tags: SEAGULL

[15 Nov 2010 9:46] Magnus Blåudd
Description:
Speed up replicated NDB test by havin mysqltest poll every 100ms (instead of every second) in sync_master_with_slave. Default epoch timeout is 100ms, so that make sense.

How to repeat:
.

Suggested fix:
=== modified file client/mysqltest.cc
--- client/mysqltest.cc	2010-05-14 08:21:40 +0000
+++ client/mysqltest.cc	2010-06-10 05:17:33 +0000
@@ -3954,7 +3954,7 @@
         const char latest_applied_binlog_epoch_str[]=
           "latest_applied_binlog_epoch=";
         if (count)
-          sleep(1);
+          my_sleep(100*1000); /* 100ms */
         if (mysql_query(mysql, query= "show engine ndb status"))
           die("failed in '%s': %d %s", query,
               mysql_errno(mysql), mysql_error(mysql));
@@ -4043,7 +4043,7 @@
 	count++;
 	if (latest_handled_binlog_epoch >= start_epoch)
           do_continue= 0;
-        else if (count > 30)
+        else if (count > 300) /* 30s */
 	{
 	  break;
         }
[15 Nov 2010 9:52] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/123861
[15 Nov 2010 10:07] Bjørn Munch
OK to push.
[15 Nov 2010 11:48] Magnus Blåudd
Pushed to 5.5-mtr
[23 Nov 2010 20:33] Paul DuBois
Changes to test suite. No changelog entry needed.
[5 Dec 2010 12:43] Bugs System
Pushed into mysql-trunk 5.6.1 (revid:alexander.nozdrin@oracle.com-20101205122447-6x94l4fmslpbttxj) (version source revid:alexander.nozdrin@oracle.com-20101205122447-6x94l4fmslpbttxj) (merge vers: 5.6.1) (pib:23)
[16 Dec 2010 22:33] Bugs System
Pushed into mysql-5.5 5.5.9 (revid:jonathan.perkin@oracle.com-20101216101358-fyzr1epq95a3yett) (version source revid:jonathan.perkin@oracle.com-20101216101358-fyzr1epq95a3yett) (merge vers: 5.5.9) (pib:24)