Re: [Maria-developers] Review of MDEV-4506, parallel replication, part 1

2013-09-26 Thread Kristian Nielsen
Kristian Nielsen kniel...@knielsen-hq.org writes: So we should introduce rgi-abort_slave, and set it during STOP SLAVE for all queued rgi entries. Actually, we do not need to introduce another flag. We can just check rgi-rli-abort_slave. - Kristian.

Re: [Maria-developers] Review of MDEV-4506, parallel replication, part 1

2013-09-25 Thread Kristian Nielsen
Hi Monty, So as promised, I took a look at the existing code for STOP SLAVE, and came up with some ideas for how to extend this to handle parallel replication. In existing code, STOP SLAVE ends up in terminate_slave_threads(). The interesting part here is the SQL thread; stopping the IO thread

Re: [Maria-developers] Review of MDEV-4506, parallel replication, part 1

2013-09-23 Thread Kristian Nielsen
Michael Widenius mo...@askmonty.org writes: Kristian We _do_ need a full memory barrier here (memory barrier is implied in taking a Kristian mutex). Otherwise the compiler or CPU could re-order the setting of the Kristian wakeup_subsequent_commits_running flag with the reads and writes

Re: [Maria-developers] Review of MDEV-4506, parallel replication, part 1

2013-09-23 Thread Kristian Nielsen
Michael Widenius mo...@askmonty.org writes: What should happen if you kill a replication thread is that replication should stop for that master. Kristian This needs more thought, I think ... certainly something looks not right. After looking at the full code, I think that the logical way

Re: [Maria-developers] Review of MDEV-4506, parallel replication, part 1

2013-09-23 Thread Michael Widenius
Hi! Kristian == Kristian Nielsen kniel...@knielsen-hq.org writes: cut So there is a barrier between we set it and potentially clear it. As the 'clear' may now happen 'any time' (from other threads point of view) I don't see why it needs to be protected. Kristian Right. Kristian I looked

Re: [Maria-developers] Review of MDEV-4506, parallel replication, part 1

2013-09-23 Thread Michael Widenius
Hi! Kristian == Kristian Nielsen kniel...@knielsen-hq.org writes: Kristian Michael Widenius mo...@askmonty.org writes: What should happen if you kill a replication thread is that replication should stop for that master. cut Kristian It seems to make sense that KILL CONNECTION on the SQL

Re: [Maria-developers] Review of MDEV-4506, parallel replication, part 1

2013-09-22 Thread Michael Widenius
Hi! Kristian == Kristian Nielsen kniel...@knielsen-hq.org writes: Kristian Monty, Kristian Thanks for the comments so far. Kristian I have pushed fixes to 10.0-knielsen, and some specific replies are below. Thanks. I will review that today. Kristian - Kristian. Kristian Michael Widenius

Re: [Maria-developers] Review of MDEV-4506, parallel replication, part 1

2013-09-22 Thread Michael Widenius
Hi! Kristian == Kristian Nielsen kniel...@knielsen-hq.org writes: Kristian Michael Widenius mo...@askmonty.org writes: + if (list-wakeup_subsequent_commits_running) + { +mysql_mutex_lock(list-LOCK_wait_commit); +list-wakeup_subsequent_commits_running= false; +

Re: [Maria-developers] Review of MDEV-4506, parallel replication, part 1

2013-09-17 Thread Kristian Nielsen
Michael Widenius mo...@askmonty.org writes: + if (list-wakeup_subsequent_commits_running) + { +mysql_mutex_lock(list-LOCK_wait_commit); +list-wakeup_subsequent_commits_running= false; +mysql_mutex_unlock(list-LOCK_wait_commit); Why do we need the mutex

[Maria-developers] Review of MDEV-4506, parallel replication, part 1

2013-09-13 Thread Michael Widenius
Hi! Here is the first part of the review. I have 1/2 of one file left (rpl_parallel.cc) to review but I wanted you to have a chance to read what I have done so far. I plan to finish the review tomorrow and start working on the code during the weekend. Kristian == Kristian Nielsen

Re: [Maria-developers] Review of MDEV-4506, parallel replication, part 1

2013-09-13 Thread Kristian Nielsen
Monty, Thanks for the comments so far. I have pushed fixes to 10.0-knielsen, and some specific replies are below. - Kristian. Michael Widenius mo...@askmonty.org writes: + --slave-parallel-threads=# + If non-zero, number of threads to spawn to apply in + parallel events on the slave that