maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #10806
Re: 0aa6217: MDEV-13065 rpl.rpl_mdev-11092 fails sporadically in buildbot
Hi, Sachin!
On Jul 19, sachin wrote:
> revision-id: 0aa621722d74d317f39b4c463800959ee84a6097 (mariadb-10.0.31-33-g0aa6217)
As discussed, it should probably go into 5.5
> parent(s): 2f07709aed863ea1852a78a0d6ab718e49df8cca
> author: Sachin Setiya
> committer: Sachin Setiya
> timestamp: 2017-07-19 11:59:43 +0530
> message:
>
> MDEV-13065 rpl.rpl_mdev-11092 fails sporadically in buildbot
>
> Problem
> rpl.rpl_mdev-11092 fails in buildbot because after starting slave in
> wait_for_slave_sql_error_and_skip.inc slave is started but there may be
> chances that we have not skipped the last error and Last_SQL_Errno is
> still not zero untill the end of rpl_end.inc , which will compare
> Last_SQL_Errno to 0. So in this this case rpl_mdev-11092 fails.
>
> Solution
> After starting slave in wait_for_slave_sql_error_and_skip.inc we will wait for
> Last_SQL_Errno to become 0.
>
> ---
> mysql-test/include/wait_for_slave_sql_error_and_skip.inc | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/mysql-test/include/wait_for_slave_sql_error_and_skip.inc b/mysql-test/include/wait_for_slave_sql_error_and_skip.inc
> index 9246c18..60c8319 100644
> --- a/mysql-test/include/wait_for_slave_sql_error_and_skip.inc
> +++ b/mysql-test/include/wait_for_slave_sql_error_and_skip.inc
> @@ -66,6 +66,21 @@ if (!$slave_skip_counter) {
> }
> source include/start_slave.inc;
>
> +# Wait for 5 seconds Last_SQL_Errno to become zero
> +--let $wait_counter=50
> +while ($wait_counter)
> +{
> + let $wait_condition= query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
> + if ($wait_condition == $slave_sql_errno)
> + {
> + real_sleep 0.1;
> + dec $wait_counter;
> + }
> + if (!$wait_condition)
> + {
> + --let $wait_counter = 0;
> + }
> +}
I'd suggest to use include/wait_for_slave_param.inc here, like
let $slave_param= Last_SQL_Errno;
let $slave_param_value= 0;
source include/wait_for_slave_param.inc;
and put a comment before it, like
# start_slave.inc returns when Slave_SQL_Running=Yes. But the slave
# thread sets it before clearing Last_SQL_Errno. So we have to wait
# for Last_SQL_Errno=0 separately.
> --let $include_filename= wait_for_slave_sql_error_and_skip.inc [errno=$slave_sql_errno]
> --source include/end_include_file.inc
Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx