maria-developers team mailing list archive
Mailing list archive
Re: 答复: 答复: 答复: MDEV-520: consider parallel replication patch from taobao patches
On Thu, 10 Jan 2013 14:24:32 +0100, Kristian Nielsen
Kristian Nielsen <knielsen@xxxxxxxxxxxxxxx> writes:
The patch makes later transactions wait for earlier transactions to
before committing themselves.
Hm, I now realise a problem with this approach :-/
The problem is with MyISAM tables, or other tables that use
locking instead of row-level locking.
If transactions T1 and T2 both update the same table mytable, then it
happen that T2 runs first and gets a table lock on table mytable. T1
to wait for T2 to commit, after which the table lock is released. But
never commit, it will wait for T1 to commit first with my patch. Thus
One way to fix this could be to extend your algorithm for detecting
between different transactions. If some table T uses table-level
put into the hash just the table name, without any primary key
any two such transactions will be considered conflicting, and we
deadlock. No loss of parallelism should occur, as two updates to the
MyISAM table can anyway not run in parallel.
But multiple inserts can occur in parallel if rows are fixed-length.
is an important feature for a particular purpose I use daily
(event logging getting replicated from data collectors to data
Having a way to get past the single-thread bottleneck on a pure-insert
workload would be extremely useful. I have to use a non-transactional
table engine for the replicated table because of a quirk with data
straddling replication stopping/starting and table