List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:June 17 2011 6:02pm
Subject:bzr push into mysql-next-mr-wl5569 branch (andrei.elkin:3303 to 3304) WL#5569
View as plain text  
 3304 Andrei Elkin	2011-06-17
      wl#5569 MTS
      
      fixing tests and a segfault at the end of handle_slave_sql() happened after worker initialization
      failed (e.g rpl_row_log on win).
     @ mysql-test/extra/rpl_tests/rpl_loaddata.test
        MTS-suppression is added.
     @ mysql-test/suite/rpl/r/rpl_loaddata.result
        MTS-suppression is added.
     @ mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result
        MTS-suppression is added.
     @ mysql-test/suite/sys_vars/t/disabled.def
        constant nuisanse is disabled in the feature tree.
        Todo: do not merge it when pushing to the main tree.
     @ sql/rpl_slave.cc
        Moved workers initialization after one of the coordinator so that
        failure in the former routine is handled with a proper state of coordinator.
        
        This fix eliminates segfault at the end of handle_slave_sql() for few tests but does not address the reason
        of worker initialization failure, like in rpl_row_log on win:
        110616  7:37:57 [Note] Info file G:\pb2\test\sb_1-3486364-1308189142.46\mysql-5.6.3-m5-win-x86_64-test\mysql-test\var-rpl-ps_row\4\mysqld.2\data\relay-log.info.0 cannot be accessed (errno 13). Most likely this is a new slave or you are  changing the repository type.
        110616  7:37:57 [ERROR] G:/pb2/test/sb_1-3486364-1308189142.46/mysql-5.6.3-m5-win-x86_64-test/sql/Debug/mysqld.exe: File 'G:\pb2\test\sb_1-3486364-1308189142.46\mysql-5.6.3-m5-win-x86_64-test\mysql-test\var-rpl-ps_row\4\mysqld.2\data\relay-log.info.0' not found (Errcode: 13)
        110616  7:37:57 [ERROR] Failed to create a new info file (file 'G:\pb2\test\sb_1-3486364-1308189142.46\mysql-5.6.3-m5-win-x86_64-test\mysql-test\var-rpl-ps_row\4\mysqld.2\data\relay-log.info.0', errno 13)
        110616  7:37:57 [ERROR] Error reading slave worker configuration
        110616  7:37:57 [ERROR] Failed during slave worker thread create
        110616  7:37:57 [ERROR] Slave SQL: Failed during slave workers initialization, Error_code: 1593

    modified:
      mysql-test/extra/rpl_tests/rpl_loaddata.test
      mysql-test/suite/rpl/r/rpl_loaddata.result
      mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result
      mysql-test/suite/sys_vars/t/disabled.def
      sql/rpl_slave.cc
 3303 Andrei Elkin	2011-06-17
      wl#5569 MTS
      
      fixing tests.
     @ mysql-test/extra/rpl_tests/rpl_parallel_benchmark_load.test
        making aux file names unique to please mtr, pb.
     @ mysql-test/extra/rpl_tests/rpl_parallel_load_innodb.test
        making aux file names unique to please mtr, pb.
     @ mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result
        MTS-suppression is added.
     @ mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result
        MTS-suppression is added.
     @ mysql-test/suite/rpl/r/rpl_parallel_benchmark.result
        making aux file names unique to please mtr, pb.
     @ mysql-test/suite/rpl/r/rpl_parallel_innodb.result
        making aux file names unique to please mtr, pb.
     @ mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result
        MTS-suppression is added.
     @ mysql-test/suite/rpl/r/rpl_typeconv.result
        MTS-suppression is added.
     @ mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test
        MTS-suppression is added.
     @ mysql-test/suite/rpl/t/rpl_parallel_benchmark-slave.opt
        cleanup.
     @ mysql-test/suite/rpl/t/rpl_typeconv.test
        MTS-suppression is added.
     @ mysql-test/suite/sys_vars/r/slave_parallel_workers_basic.result
        results updated.
     @ sql/sql_class.h
        Cleanup to remove early debug-related options.
     @ sql/sys_vars.cc
        Fixating slave_parallel_workers' max as 1024.
        Cleanup to remove early debug-related options.

    modified:
      mysql-test/extra/rpl_tests/rpl_parallel_benchmark_load.test
      mysql-test/extra/rpl_tests/rpl_parallel_load_innodb.test
      mysql-test/suite/rpl/r/rpl_filter_tables_not_exist.result
      mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_parallel_benchmark.result
      mysql-test/suite/rpl/r/rpl_parallel_innodb.result
      mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result
      mysql-test/suite/rpl/r/rpl_typeconv.result
      mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test
      mysql-test/suite/rpl/t/rpl_parallel_benchmark-slave.opt
      mysql-test/suite/rpl/t/rpl_typeconv.test
      mysql-test/suite/sys_vars/r/slave_parallel_workers_basic.result
      sql/sql_class.h
      sql/sys_vars.cc
=== modified file 'mysql-test/extra/rpl_tests/rpl_loaddata.test'
--- a/mysql-test/extra/rpl_tests/rpl_loaddata.test	2011-02-23 20:01:27 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_loaddata.test	2011-06-17 18:01:58 +0000
@@ -71,6 +71,7 @@ connection slave;
 # 1062 = ER_DUP_ENTRY
 call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062");
 call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
 --let $slave_sql_errno= 1062
 --source include/wait_for_slave_sql_error_and_skip.inc
 

=== modified file 'mysql-test/suite/rpl/r/rpl_loaddata.result'
--- a/mysql-test/suite/rpl/r/rpl_loaddata.result	2011-02-23 20:01:27 +0000
+++ b/mysql-test/suite/rpl/r/rpl_loaddata.result	2011-06-17 18:01:58 +0000
@@ -29,6 +29,7 @@ insert into t1 values(1,10);
 load data infile '../../std_data/rpl_loaddata.dat' into table t1;
 call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062");
 call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
 include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
 include/check_slave_no_error.inc
 set sql_log_bin=0;

=== modified file 'mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result'
--- a/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result	2011-02-23 20:01:27 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stm_loaddata_concurrent.result	2011-06-17 18:01:58 +0000
@@ -45,6 +45,7 @@ insert into t1 values(1,10);
 load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
 call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062");
 call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0");
+call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
 include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
 include/check_slave_no_error.inc
 set sql_log_bin=0;

=== modified file 'mysql-test/suite/sys_vars/t/disabled.def'
--- a/mysql-test/suite/sys_vars/t/disabled.def	2011-05-23 11:33:41 +0000
+++ b/mysql-test/suite/sys_vars/t/disabled.def	2011-06-17 18:01:58 +0000
@@ -15,3 +15,4 @@ transaction_prealloc_size_basic_32  : Bu
 transaction_prealloc_size_basic_64  : Bug#11748572
 #thread_cache_size_func             : Bug#11750172: 2008-11-07 joro main.thread_cache_size_func fails in pushbuild when run with pool of threads
 
+all_vars			    : bug#12664445  Fri Jun 17 20:40:24 EEST 2011 andrei

=== modified file 'sql/rpl_slave.cc'
--- a/sql/rpl_slave.cc	2011-06-17 10:51:59 +0000
+++ b/sql/rpl_slave.cc	2011-06-17 18:01:58 +0000
@@ -4406,14 +4406,6 @@ pthread_handler_t handle_slave_sql(void 
 
   pthread_detach_this_thread();
 
-  /* MTS: starting the worker pool */
-  if (slave_start_workers(rli, rli->opt_slave_parallel_workers) != 0)
-  {
-      mysql_mutex_unlock(&rli->run_lock);
-      rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR, 
-                  "Failed during slave workers initialization");
-      goto err;
-  }
   if (init_slave_thread(thd, SLAVE_THD_SQL))
   {
     /*
@@ -4432,6 +4424,16 @@ pthread_handler_t handle_slave_sql(void 
   mysql_mutex_lock(&LOCK_thread_count);
   threads.append(thd);
   mysql_mutex_unlock(&LOCK_thread_count);
+
+  /* MTS: starting the worker pool */
+  if (slave_start_workers(rli, rli->opt_slave_parallel_workers) != 0)
+  {
+    mysql_cond_broadcast(&rli->start_cond);
+    mysql_mutex_unlock(&rli->run_lock);
+    rli->report(ERROR_LEVEL, ER_SLAVE_FATAL_ERROR, 
+                "Failed during slave workers initialization");
+    goto err;
+  }
   /*
     We are going to set slave_running to 1. Assuming slave I/O thread is
     alive and connected, this is going to make Seconds_Behind_Master be 0


Attachment: [text/bzr-bundle] bzr/andrei.elkin@oracle.com-20110617180158-1fjn4xd2ngc4zq5a.bundle
Thread
bzr push into mysql-next-mr-wl5569 branch (andrei.elkin:3303 to 3304) WL#5569Andrei Elkin19 Jun