dtle icon indicating copy to clipboard operation
dtle copied to clipboard

The second rename table is invalid,different records for the same table of a single MySQL are distributed to multiple MySQL

Open yaqigithub opened this issue 5 years ago • 0 comments

Description when create a table level copy job, the Dtle will not support the DDL of rename table name repeatedly .for example: 1st:rename alter table testPK_1 rename child; 2nd:rename alter table child rename testPK_2;

Steps to reproduce the issue:

  1. Do as #300 step1-step5
  2. Execute the below mysql statement on SRC (DDL rename twice) alter table child rename testPK_2;
  3. Check the difference between SRC and DEST show tabels;

Describe the results you received: The second rename is invalid

Describe the results you expected: The second rename become effective Output of ./dtle version:

Dtle 9.9.9.9 (git: master 203100a4b7f72fe636c3461c97a4fe13ac7c7cdf)

Additional information you deem important (e.g. issue happens only occasionally):

  1. Always happened on table level copy no matter what kind of scenario(e.g. single to single,aggregation,spread,etc)
  2. #300 maybe related
  3. Schema level work normally(support repeatedly)

Additional details (log, config, job config etc):

  1. job.json: job1.json.txt job2.json.txt

  2. dtle.log

2019/05/10 13:26:46.533188 [DEBUG] Worker.SaveState: after unlock: 0xc0013e08c0 
2019/05/10 13:26:49.123474 [DEBUG] [jobid:0665f1f1-2c5e-dc4f-d054-e43e40f738a1] mysql.reader: query event: schema: testHA, query: alter table chi
ld rename testPK_2 
2019/05/10 13:26:49.123507 [DEBUG] [jobid:52c30b8a-c973-8e8d-6578-103682aefdf8] mysql.reader: query event: schema: testHA, query: alter table chi
ld rename testPK_2 
2019/05/10 13:26:49.124061 [DEBUG] [jobid:0665f1f1-2c5e-dc4f-d054-e43e40f738a1] mysql.reader: Skip QueryEvent currentSchema: testHA, sql: alter t
able child rename testPK_2, realSchema: testHA, tableName: child 
2019/05/10 13:26:49.124067 [DEBUG] [jobid:52c30b8a-c973-8e8d-6578-103682aefdf8] mysql.reader: Skip QueryEvent currentSchema: testHA, sql: alter t
able child rename testPK_2, realSchema: testHA, tableName: child 
2019/05/10 13:26:49.123483 [DEBUG] [jobid:64199eb4-0e9e-3af1-6fe2-8eb42d9e1e3a] mysql.reader: query event: schema: testHA, query: alter table chi
ld rename testPK_2 
2019/05/10 13:26:49.124206 [DEBUG] [jobid:64199eb4-0e9e-3af1-6fe2-8eb42d9e1e3a] mysql.reader: Skip QueryEvent currentSchema: testHA, sql: alter t
able child rename testPK_2, realSchema: testHA, tableName: child 
2019/05/10 13:26:52.903701 [DEBUG] [jobid:0665f1f1-2c5e-dc4f-d054-e43e40f738a1] mysql.applier: no binlogEntry for 10s 

yaqigithub avatar May 10 '19 07:05 yaqigithub