[MDEV-5033] Replication filter producing unecessary table locking on the slave Created: 2013-09-18 Updated: 2014-10-25 Due: 2014-10-25 Resolved: 2014-10-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Affects Version/s: | 10.0.4 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | VAROQUI Stephane | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux x86_64 |
||
| Description |
|
Master have multiple databases with the same non transactional table (blackhole) inside every schema . We randomly insert records into all databases tables. Start a replication and filtering on a single database (replicate-do-db=schema1) . We observe sql thread locking all the tables of all the databases . The SQL thread is in locking state on the COMMIT statement . Despite this the filter works for DML and no records are inserted.
In multi source we have 24 shards so all domain concurrently replay same lock and unlock tables decreasing the all replication speed . Can we do something to remove the lock introduce by the master when inserting into non transactional table . or can we detect that the lock is part of a transaction that is fully filtered |
| Comments |
| Comment by Elena Stepanova [ 2014-10-11 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
I couldn't reproduce the problem (even on 10.0.4), although maybe I just failed to decipher the description properly. Here my MTR-like test case, as I understood the issue:
If it's run without replicate-do-db, show processlist expectedly shows that the slave thread replicating insert into test1.t is waiting for table metadata lock. Allegedly, the test with replicate-do-db=test2 should show the same, if the slave thread still attempts to lock test1.t (it cannot do so because the table is locked by another thread). However, I don't see it happen, processlist doesn't show any lock waits.
Please clarify what's the difference between the original scenario and the one in the test case. | |||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-10-25 ] | |||||||||||||||||||||||||||||||||||||||||||||||
|
Closing for now as 'can't reproduce', please comment to re-open if you have any additional information. |