[MDEV-6321] close_temporary_tables() in format description event not serialised correctly Created: 2014-06-10 Updated: 2014-10-01 Resolved: 2014-08-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Affects Version/s: | 10.0.11 |
| Fix Version/s: | 10.0.14 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Kristian Nielsen | Assignee: | Kristian Nielsen |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | parallelslave, replication | ||
| Description |
|
In Start_log_event_v3::do_apply_event(), there is code to detect when the This is a problem in parallel replication, as the code currently does not have The code needs to handle this:
|
| Comments |
| Comment by Kristian Nielsen [ 2014-07-02 ] |
|
Patch for review: http://lists.askmonty.org/pipermail/commits/2014-July/006275.html |
| Comment by Kristian Nielsen [ 2014-07-02 ] |
|
Hm, I think that patch is not enough. We also need to handle the case where the master crashes after writing only part of a transaction into the binlog. In this case, the following format description event is used to notify of the partial event group that must be rolled back. So I think when the FD event is encountered, we need to queue some marker event that tells the worker thread with the partial event group to roll back, otherwise we will deadlock with FD event waiting for group to complete and group waiting for FD event to know it must roll back... |
| Comment by Kristian Nielsen [ 2014-08-19 ] |
|
Patches for review: http://lists.askmonty.org/pipermail/commits/2014-August/006421.html http://lists.askmonty.org/pipermail/commits/2014-August/006423.html |
| Comment by Kristian Nielsen [ 2014-08-19 ] |
|
Assigning to Monty for review, as agreed on the IRC |
| Comment by Michael Widenius [ 2014-08-19 ] |
|
Review for patch 1 void Add a comment why we don't need a mutex while we loop over I assume this is because this is called by the driver thread and it's + max_i= domain_hash.records; + mysql_mutex_unlock(&e->LOCK_parallel_entry); + } <cut> + if (typ == FORMAT_DESCRIPTION_EVENT) + } What happens if one of the thread we are waiting for fails and has to Will rli->abort_slave or sql_thread_stopping be set in this case so Appart for the above questions, I don't have any other comments. Regards, |
| Comment by Michael Widenius [ 2014-08-19 ] |
|
Done. See comments |
| Comment by Kristian Nielsen [ 2014-08-20 ] |
|
> What happens if one of the thread we are waiting for fails and has to Good catch, if the SQL driver thread gets killed while in this wait, the code If one of the threads we are waiting for returns failure from (If a thread gets a temporary error and needs to retry a transaction, it will Thanks for review! |
| Comment by Kristian Nielsen [ 2014-08-20 ] |
|
Pushed to 10.0 |