thinkingqi / mysql-master-ha

Automatically exported from code.google.com/p/mysql-master-ha
0 stars 0 forks source link

masterha_check_repl locks queries to innodb tables for a short time #72

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

What steps will reproduce the problem?
1. Force mysql to create all new tables in innodb
2. Start masterha_check_repl check
3. Innodb locks for a short time and causes errors timeouts on queries

What is the expected output? What do you see instead?
Replication check script should not severally impact Mysql performance

What version of the product are you using? On what operating system?
mha4mysql-node-0.54
mha4mysql-manager-0.55
opensuse 11
Percona Server 5.5.24-rel26.0-256

Please provide any additional information below.

/usr/bin/apply_diff_relay_logs utility should explicitly set myisam engine 
during replications tests:
"mysql --user=$_escaped_slave_user --password=$_escaped_slave_pass 
--host=$opt{slave_ip} --port=$opt{slave_port} -e \"set sql_log_bin=0; create 
table if not exists mysql.apply_diff_relay_logs_test(id int); insert into 
mysql.apply_diff_relay_logs_test values(1); update 
mysql.apply_diff_relay_logs_test set id=id+1 where id=1; delete from 
mysql.apply_diff_relay_logs_test; drop table 
mysql.apply_diff_relay_logs_test;\""

to
"mysql --user=$_escaped_slave_user --password=$_escaped_slave_pass 
--host=$opt{slave_ip} --port=$opt{slave_port} -e \"set sql_log_bin=0; create 
table if not exists mysql.apply_diff_relay_logs_test(id int) engine myisam; 
insert into mysql.apply_diff_relay_logs_test values(1); update 
mysql.apply_diff_relay_logs_test set id=id+1 where id=1; delete from 
mysql.apply_diff_relay_logs_test; drop table 
mysql.apply_diff_relay_logs_test;\""

Innodb table creation/deletion shortly locks innodb pool and causes timeouts, 
myisam table creation/deletion has much less impact on server (I did not detect 
significant impact at all).

Original issue reported on code.google.com by arturas....@gmail.com on 20 Dec 2013 at 8:46