← Back to team overview

maria-developers team mailing list archive

Re: 01612f594b3: MDEV-23769: MTR can abort before it prints the test result summary

 

Hi, Anel!

On Oct 22, Anel Husakovic wrote:
> Hi Sergei,
> thanks for the review.
> 
> Having warning/error is a necessary condition.
> Sufficient condition is to call at least 2 tests.
> Incorrect behaviour can be seen if:
> - Both tests are correct but there is error generated (incorrect option
> passed):
>   So this `./mysql-test/mtr --mysqld=--lock-wait-timeout=-xx 1st` will
> generate and write statistic at the end,
>   but this `./mysql-test/mtr --mysqld=--lock-wait-timeout=-xx 1st 1st
> --force` will not generate the statistic.
>   Note: warning is generated (--mysqld=--lock-wait-timeout=-1) statistic
> will be generated

Okay, thanks. This would be useful to show in the commit comment,
that one can use

  ./mtr --mysqld=--lock-wait-timeout=-xx 1st 1st --force --parallel 1

to repeat the error.

But then I don't understand why this happens. Why one failure is not
enough? Why --parallel 2 destroys the effect?

Apparently, it's check_warnings_post_shutdown() that causes that, not
exit(1). One can change to exit(0) or remove exit(1) completely - the
bug will still happen. Why check_warnings_post_shutdown() writing to the
master server causes this bug?

It looks rather fishy that in your fix it's the worker process that
prints the statistics, not the master.

Btw, note that check_warnings_post_shutdown() doesn't have any return
statement, it very implicitly return "number of bytes sent" - it would
be easier to read if it'd return something explicitly.

Regards,
Sergei
VP of MariaDB Server Engineering
and security@xxxxxxxxxxx


References