Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: 10.0.4
-
Fix Version/s: N/A
-
Component/s: Replication
-
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.
#130918 13:45:23 server id 3164 end_log_pos 925 GTID 0-3164-275862697 /*!100001 SET @@session.gtid_seq_no=275862697*//*!*/; BEGIN /*!*/; # at 925 #130918 13:45:23 server id 3164 end_log_pos 1594 Query thread_id=15 exec_time=0 error_code=0 use `ccmstats_shard04`/*!*/; SET TIMESTAMP=1379504723/*!*/; insert high_priority ignore into `ccmstats_shard04`.`ccmreferers`(`ip`,`date`,`firstseenon`,`keyword`,`domaine`,`referer`,`keyword_crc64`)values(1770066430,'2013-09-18 13:45:23','/download/telecharger-34056887','','www.commentcamarche.net','http://www.google.com/url?sa=t&rct=j&q=',5255623658049533571) /*!*/; # at 1594
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
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
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.