← Back to team overview

maria-developers team mailing list archive

Re: Transactions behind a failed transaction could commit in parallel replication

 

"nanyi607rao" <nanyi607rao@xxxxxxxxx> writes:

>       if (!rgi->is_error && !skip_event_group)
>         err= rpt_handle_event(events, rpt);
>       else
>         err= thd->wait_for_prior_commit();     
>       ... ...             
>       finish_event_group(thd, err, event_gtid_sub_id, entry, rgi);
>
> if the failed transaction didn't fail at end event, err's value would come
> from wait_for_prior_commit, the err would be 0 if its former transaction has
> successed, then the failed transaction would tell latter transactions ok to
> commit in finish_event_group.

I have pushed to 10.0 now a fix for this bug (which I also filed as
https://mariadb.atlassian.net/browse/MDEV-5921).
The fix is just to pass rgi->is_error to finish_event_group() instead of err,
which as you said may not be set correctly in case of error from an earlier
event.
Hopefully this fixes the issue.

BTW, this bug actually also turned up as part of
https://mariadb.atlassian.net/browse/MDEV-5863. It was pretty cool to start
looking at that bug and then realise that I already had the solution in my
mailbox from you, thanks a lot!

 - Kristian.


References