List:Commits« Previous MessageNext Message »
From:Luís Soares Date:January 11 2010 4:02pm
Subject:Re: bzr commit into mysql-backup-backport branch (aelkin:3050)
Bug#50176
View as plain text  
Approved.

Regards,
Luís

On Mon, 2010-01-11 at 10:33 +0000, Andrei Elkin wrote:
> #At file:///home/andrei/MySQL/BZR/FIXES/bckp_port-bug_rpl_backup/ based on
> revid:thavamuni.alagu@stripped
> 
>  3050 Andrei Elkin	2010-01-11
>       Bug #50176 rpl_backup_block times out on mysql-backup-backport
>       
>       The timeout happened as a combination of actual values for the global
> master_retry_connect
>       and mi->connect_retry set way too big and treating ER_MASTER_BLOCKING_SLAVES
> as a reconnectable
>       error.
>       
>       Fixed with setting the two parameters of the 2nd slave to correspond to mtr
> defaults
>       and making `ER_MASTER_BLOCKING_SLAVES' critical so that auto-reconnecting is
> not to happen.
>      @ mysql-test/suite/rpl/r/rpl_backup_block.result
>         results changed.
>      @ mysql-test/suite/rpl/t/rpl_backup_block.cnf
>         Setting the slave connect retry to the mtr's default.
>      @ mysql-test/suite/rpl/t/rpl_backup_block.test
>         setting up MASTER_CONNECT_RETRY=1 for the 2nd slave explicitly to the value
> of 
>         master-slave-reset.inc;
>         simplifying output in the case 2;
>         correcting the suppressions.
>      @ sql/slave.cc
>         Making `ER_MASTER_BLOCKING_SLAVES' critical so that auto-reconnecting is not
> to happen.
> 
>     modified:
>       mysql-test/suite/rpl/r/rpl_backup_block.result
>       mysql-test/suite/rpl/t/rpl_backup_block.cnf
>       mysql-test/suite/rpl/t/rpl_backup_block.test
>       sql/slave.cc
> === modified file 'mysql-test/suite/rpl/r/rpl_backup_block.result'
> --- a/mysql-test/suite/rpl/r/rpl_backup_block.result	2010-01-06 15:03:50 +0000
> +++ b/mysql-test/suite/rpl/r/rpl_backup_block.result	2010-01-11 10:33:26 +0000
> @@ -114,53 +114,14 @@ The incident RESTORE_ON_MASTER occured o
>  # Case 2 - Verify a new slave cannot connect
>  #
>  # Connecting to slave 2...
> -CHANGE MASTER TO
> master_host='127.0.0.1',master_port=MASTER_A_PORT,master_user='root',MASTER_LOG_FILE='MASTER_A_LOG_FILE';
> +CHANGE MASTER TO master_host='127.0.0.1', master_port=MASTER_A_PORT,
> master_user='root', MASTER_CONNECT_RETRY=1, MASTER_LOG_FILE='MASTER_A_LOG_FILE';
>  # Capture slave 2's backupdir.
>  SET @@global.backupdir= @@global.datadir;
>  # Now verify slave cannot start.
>  START SLAVE IO_THREAD;
> -SHOW SLAVE STATUS;
> -Slave_IO_State	#
> -Master_Host	127.0.0.1
> -Master_User	root
> -Master_Port	MASTER_PORT
> -Connect_Retry	60
> -Master_Log_File	#
> -Read_Master_Log_Pos	#
> -Relay_Log_File	#
> -Relay_Log_Pos	#
> -Relay_Master_Log_File	#
> -Slave_IO_Running	No
> -Slave_SQL_Running	No
> -Replicate_Do_DB	
> -Replicate_Ignore_DB	
> -Replicate_Do_Table	
> -Replicate_Ignore_Table	#
> -Replicate_Wild_Do_Table	
> -Replicate_Wild_Ignore_Table	
> -Last_Errno	0
> -Last_Error	
> -Skip_Counter	#
> -Exec_Master_Log_Pos	#
> -Relay_Log_Space	#
> -Until_Condition	None
> -Until_Log_File	
> -Until_Log_Pos	0
> -Master_SSL_Allowed	No
> -Master_SSL_CA_File	
> -Master_SSL_CA_Path	
> -Master_SSL_Cert	
> -Master_SSL_Cipher	
> -Master_SSL_Key	
> -Seconds_Behind_Master	#
> -Master_SSL_Verify_Server_Cert	No
> -Last_IO_Errno	1765
> -Last_IO_Error	The master is not allowing slave connections.
> -Last_SQL_Errno	#
> -Last_SQL_Error	#
> -Replicate_Ignore_Server_Ids	
> -Master_Server_Id	1
>  # Show the slave stopped with an error.
> +Slave_IO_Running
> +No
>  Last_IO_Error
>  The master is not allowing slave connections.
>  #
> @@ -264,7 +225,7 @@ Slave_IO_State	#
>  Master_Host	127.0.0.1
>  Master_User	root
>  Master_Port	MASTER_PORT
> -Connect_Retry	60
> +Connect_Retry	1
>  Master_Log_File	#
>  Read_Master_Log_Pos	#
>  Relay_Log_File	#
> @@ -340,6 +301,6 @@ DROP DATABASE rpl_backup_block;
>  SET @@global.backupdir = DEFAULT;
>  SET DEBUG_SYNC = 'reset';
>  call mtr.add_suppression("Stopping slave I.O thread due to Restore are running on
> the master");
> -call mtr.add_suppression("Slave I.O: The master is not allowing slave connections.
> Error_code: 1765");
> +call mtr.add_suppression("Slave I.O: The master is not allowing slave
> connections");
>  call mtr.add_suppression("Stopping slave I.O thread due to Restore are running on
> the master");
> -call mtr.add_suppression("Slave I.O: The master is not allowing slave connections.
> Error_code: 1765");
> +call mtr.add_suppression(".*master is not allowing slave connections");
> 
> === modified file 'mysql-test/suite/rpl/t/rpl_backup_block.cnf'
> --- a/mysql-test/suite/rpl/t/rpl_backup_block.cnf	2010-01-06 15:18:07 +0000
> +++ b/mysql-test/suite/rpl/t/rpl_backup_block.cnf	2010-01-11 10:33:26 +0000
> @@ -8,9 +8,8 @@ server_id=2
>  
>  [mysqld.3]
>  server_id=3
> +master-retry-count=10
>  
>  [ENV]
>  SLAVE_MYPORT2=		@mysqld.3.port
>  SLAVE_MYSOCK2=		@mysqld.3.socket
> -
> -
> 
> === modified file 'mysql-test/suite/rpl/t/rpl_backup_block.test'
> --- a/mysql-test/suite/rpl/t/rpl_backup_block.test	2010-01-06 15:03:50 +0000
> +++ b/mysql-test/suite/rpl/t/rpl_backup_block.test	2010-01-11 10:33:26 +0000
> @@ -110,7 +110,7 @@ eval SELECT "$last_error" AS Last_SQL_Er
>  --echo # Connecting to slave 2...
>  connection slave2;
>  --replace_result $MASTER_MYPORT MASTER_A_PORT $_binlog_file MASTER_A_LOG_FILE
> ---eval CHANGE MASTER TO
> master_host='127.0.0.1',master_port=$MASTER_MYPORT,master_user='root',MASTER_LOG_FILE='$_binlog_file'
> +--eval CHANGE MASTER TO master_host='127.0.0.1', master_port=$MASTER_MYPORT,
> master_user='root', MASTER_CONNECT_RETRY=1, MASTER_LOG_FILE='$_binlog_file'
>  
>  --echo # Capture slave 2's backupdir.
>  let $MYSQLD_S2_BACKUPDIR= `select @@datadir`;
> @@ -120,13 +120,11 @@ SET @@global.backupdir= @@global.datadir
>  START SLAVE IO_THREAD;
>  source include/wait_for_slave_io_to_stop.inc;
>  
> ---replace_result $MASTER_MYPORT MASTER_PORT
> ---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 16 # 21 # 22 # 23 # 33 # 37 # 38 #
> ---query_vertical SHOW SLAVE STATUS
> -
>  --echo # Show the slave stopped with an error.
> +LET $io_status= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1);
>  LET $last_error= query_get_value("SHOW SLAVE STATUS", Last_IO_Error, 1);
>  --disable_query_log
> +eval SELECT "$io_status" AS Slave_IO_Running;
>  eval SELECT "$last_error" AS Last_IO_Error;
>  --enable_query_log
>  
> @@ -279,7 +277,7 @@ SET DEBUG_SYNC = 'reset';
>  
>  connection slave;
>  call mtr.add_suppression("Stopping slave I.O thread due to Restore are running on
> the master");
> -call mtr.add_suppression("Slave I.O: The master is not allowing slave connections.
> Error_code: 1765");
> +call mtr.add_suppression("Slave I.O: The master is not allowing slave
> connections");
>  connection slave2;
>  call mtr.add_suppression("Stopping slave I.O thread due to Restore are running on
> the master");
> -call mtr.add_suppression("Slave I.O: The master is not allowing slave connections.
> Error_code: 1765");
> +call mtr.add_suppression(".*master is not allowing slave connections");
> 
> === modified file 'sql/slave.cc'
> --- a/sql/slave.cc	2009-12-22 16:09:15 +0000
> +++ b/sql/slave.cc	2010-01-11 10:33:26 +0000
> @@ -2803,6 +2803,12 @@ Stopping slave I/O thread due to out-of-
>            mi->report(ERROR_LEVEL, ER_OUT_OF_RESOURCES,
>                       "%s", ER(ER_OUT_OF_RESOURCES));
>            goto err;
> +        case ER_MASTER_BLOCKING_SLAVES:
> +          sql_print_error("\
> +Stopping slave I/O thread due to master is not allowing slave connections");
> +          mi->report(ERROR_LEVEL, ER_MASTER_BLOCKING_SLAVES,
> +                     "%s", ER(ER_MASTER_BLOCKING_SLAVES));
> +          goto err;
>          }
>          if (try_to_reconnect(thd, mysql, mi, &retry_count, suppress_warnings,
>                               reconnect_messages[SLAVE_RECON_ACT_EVENT]))
> 


Thread
bzr commit into mysql-backup-backport branch (aelkin:3050) Bug#50176Andrei Elkin11 Jan
  • Re: bzr commit into mysql-backup-backport branch (aelkin:3050)Bug#50176Luís Soares11 Jan
  • Re: bzr commit into mysql-backup-backport branch (aelkin:3050)Bug#50176Charles Bell11 Jan