Skip to content

mysql-mysql job full repl stage: big data cause the job to be stuck #923

Closed
@asiroliu

Description

@asiroliu

Description

mysql-mysql job full repl stage: big data cause the job to be stuck

Steps to reproduce the issue

  1. src MySQL insert 2GB data
drop table if exists big_tx;
create table if not exists big_tx (id int primary key auto_increment, val longtext);
set @a = repeat('a', 1*1024*1024);

begin;
insert into big_tx values (0, @a);
insert into big_tx values (0, @a);
insert into big_tx values (0, @a);
insert into big_tx values (0, @a);
--  2048 sqls, 2GB
commit;
  1. create dtle job, set chunk_size=10000
  2. after long time, check on dest MySQL
mysql> select count(*) from big_tx;
+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set (0.00 sec)
  1. check src dtle log
022-03-24T17:07:35.938+0800 [DEBUG] client.driver_mgr.dtle: ShowCreateSchema: driver=dtle query="SHOW CREATE SCHEMA IF NOT EXISTS `action_db_1`" timestamp=2022-03-24T17:07:35.938+0800
2022-03-24T17:07:35.939+0800 [DEBUG] client.driver_mgr.dtle: ShowTables: driver=dtle query="SHOW TABLES IN `action_db_1`" timestamp=2022-03-24T17:07:35.938+0800
2022-03-24T17:07:35.939+0800 [INFO]  client.driver_mgr.dtle: ValidateOriginalTable: driver=dtle @module=inspector job=big_tx-migration where=true timestamp=2022-03-24T17:07:35.939+0800
2022-03-24T17:07:35.944+0800 [DEBUG] client.driver_mgr.dtle: Potential unique keys.: driver=dtle @module=inspector job=big_tx-migration schema=action_db_1 table=big_tx uniqueKeys=["map[Columns:map[Columns:[map[Charset: ColumnType: Default:<nil> EscapedName:`id` IsUnsigned:false Key: Nullable:false Precision:0 RawName:id Scale:0 TimezoneConversion:<nil> Type:0]] Ordinals:map[id:0] UniqueKeys:<nil>] HasNullable:false IsAutoIncrement:true LastMaxVals:[] Name:PRIMARY]"] timestamp=2022-03-24T17:07:35.943+0800
2022-03-24T17:07:35.944+0800 [DEBUG] client.driver_mgr.dtle: table has unique keys: driver=dtle schema=action_db_1 table=big_tx @module=inspector job=big_tx-migration n_unique_keys=1 timestamp=2022-03-24T17:07:35.944+0800
2022-03-24T17:07:35.944+0800 [DEBUG] client.driver_mgr.dtle: a unique key: driver=dtle @module=inspector job=big_tx-migration uk="PRIMARY (auto_increment): [id]; has nullable: false" timestamp=2022-03-24T17:07:35.944+0800
2022-03-24T17:07:35.945+0800 [INFO]  client.driver_mgr.dtle: chosen unique key: driver=dtle @module=inspector job=big_tx-migration schema=action_db_1 table=big_tx uk="PRIMARY (auto_increment): [id]; has nullable: false" timestamp=2022-03-24T17:07:35.945+0800
2022-03-24T17:07:35.945+0800 [INFO]  client.driver_mgr.dtle: Examining table structure on extractor: driver=dtle job=big_tx-migration @module=dtle.extractor timestamp=2022-03-24T17:07:35.945+0800
2022-03-24T17:07:35.945+0800 [DEBUG] client.driver_mgr.dtle: getSchemaTablesAndMeta. after.: driver=dtle @module=dtle.extractor job=big_tx-migration timestamp=2022-03-24T17:07:35.945+0800
2022-03-24T17:07:35.946+0800 [INFO]  client.driver_mgr.dtle: generating DROP and CREATE statements to reflect current database schemas: driver=dtle @module=dtle.extractor @warn="logging contained values that don't serialize to json" timestamp=2022-03-24T17:07:35.945+0800
2022-03-24T17:07:35.946+0800 [DEBUG] client.driver_mgr.dtle: publish. msg: driver=dtle gno=0 job=big_tx-migration msgLen=124 nSeg=1 spanLen=124 @module=dtle.extractor subject=big_tx-migration_full timestamp=2022-03-24T17:07:35.946+0800
2022-03-24T17:07:35.946+0800 [DEBUG] client.driver_mgr.dtle: publish: driver=dtle gno=0 iSeg=0 job=big_tx-migration partLen=124 subject=big_tx-migration_full @module=dtle.extractor timestamp=2022-03-24T17:07:35.946+0800
2022-03-24T17:07:35.947+0800 [DEBUG] client.driver_mgr.dtle: Estimated number of rows: driver=dtle @module=dtle.extractor job=big_tx-migration n=2042 schema=action_db_1 table=big_tx timestamp=2022-03-24T17:07:35.947+0800
2022-03-24T17:07:35.947+0800 [DEBUG] client.driver_mgr.dtle: publish. msg: driver=dtle gno=0 job=big_tx-migration msgLen=206 spanLen=206 @module=dtle.extractor nSeg=1 subject=big_tx-migration_full timestamp=2022-03-24T17:07:35.947+0800
2022-03-24T17:07:35.948+0800 [DEBUG] client.driver_mgr.dtle: publish: driver=dtle iSeg=0 partLen=206 subject=big_tx-migration_full gno=0 job=big_tx-migration @module=dtle.extractor timestamp=2022-03-24T17:07:35.947+0800
2022-03-24T17:07:35.948+0800 [INFO]  client.driver_mgr.dtle: Step: scanning contents of x tables: driver=dtle @module=dtle.extractor job=big_tx-migration n=3 x=1 timestamp=2022-03-24T17:07:35.948+0800
2022-03-24T17:07:35.948+0800 [INFO]  client.driver_mgr.dtle: Step n: - scanning table (i of N tables): driver=dtle @module=dtle.extractor N=1 job=big_tx-migration schema=action_db_1 i=1 n=3 table=big_tx timestamp=2022-03-24T17:07:35.948+0800
2022-03-24T17:07:35.948+0800 [DEBUG] client.driver_mgr.dtle: getChunkData.: driver=dtle @module=dumper job=big_tx-migration query="SELECT * FROM `action_db_1`.`big_tx` where (true) and (true) order by `id` asc LIMIT 100000" timestamp=2022-03-24T17:07:35.948+0800
2022-03-24T17:07:36.107+0800 [DEBUG] client: updated allocations: index=21 total=1 pulled=0 filtered=1
2022-03-24T17:07:36.108+0800 [DEBUG] client: allocation updates: added=0 removed=0 updated=0 ignored=1
2022-03-24T17:07:36.108+0800 [DEBUG] client: allocation updates applied: added=0 removed=0 updated=0 ignored=1 errors=0
2022-03-24T17:07:39.972+0800 [DEBUG] client.driver_mgr.dtle: getChunkData.: driver=dtle @module=dumper job=big_tx-migration n_row=2049 timestamp=2022-03-24T17:07:39.972+0800
2022-03-24T17:07:39.979+0800 [DEBUG] client.driver_mgr.dtle: GetLastMaxVal: driver=dtle @module=dumper job=big_tx-migration val=['2049'] timestamp=2022-03-24T17:07:39.978+0800
2022-03-24T17:07:39.979+0800 [DEBUG] client.driver_mgr.dtle: resultsChannel: driver=dtle @module=dumper job=big_tx-migration n=0 timestamp=2022-03-24T17:07:39.979+0800
2022-03-24T17:07:39.979+0800 [INFO]  client.driver_mgr.dtle: nRows < d.chunkSize.: driver=dtle nRows=2049 @module=dumper chunkSize=100000 job=big_tx-migration timestamp=2022-03-24T17:07:39.979+0800
2022-03-24T17:07:39.979+0800 [DEBUG] client.driver_mgr.dtle: getChunkData.: driver=dtle @module=dumper job=big_tx-migration query="SELECT * FROM `action_db_1`.`big_tx` where (((`id` > '2049'))) and (true) order by `id` asc LIMIT 100000" timestamp=2022-03-24T17:07:39.979+0800
2022-03-24T17:07:39.980+0800 [DEBUG] client.driver_mgr.dtle: getChunkData.: driver=dtle @module=dumper job=big_tx-migration n_row=0 timestamp=2022-03-24T17:07:39.980+0800
2022-03-24T17:07:39.980+0800 [INFO]  client.driver_mgr.dtle: nRows < d.chunkSize.: driver=dtle @module=dumper chunkSize=100000 job=big_tx-migration nRows=0 timestamp=2022-03-24T17:07:39.980+0800
2022-03-24T17:07:39.980+0800 [INFO]  client.driver_mgr.dtle: nRows == 0. dump finished.: driver=dtle @module=dumper chunkSize=100000 job=big_tx-migration nRows=0 timestamp=2022-03-24T17:07:39.980+0800
2022-03-24T17:07:45.961+0800 [DEBUG] client: updated allocations: index=23 total=1 pulled=0 filtered=1
2022-03-24T17:07:45.962+0800 [DEBUG] client: allocation updates: added=0 removed=0 updated=0 ignored=1
2022-03-24T17:07:45.962+0800 [DEBUG] client: allocation updates applied: added=0 removed=0 updated=0 ignored=1 errors=0
2022-03-24T17:07:50.906+0800 [DEBUG] client.driver_mgr.dtle: TimestampContext.GetDelay: driver=dtle @module=dtle.extractor delay=0 job=big_tx-migration timestamp=2022-03-24T17:07:50.906+0800
2022-03-24T17:08:08.633+0800 [DEBUG] client.driver_mgr.dtle: TimestampContext.GetDelay: driver=dtle @module=dtle.extractor delay=0 job=big_tx-migration timestamp=2022-03-24T17:08:08.632+0800
2022-03-24T17:08:24.675+0800 [DEBUG] client.driver_mgr.dtle: TimestampContext.GetDelay: driver=dtle @module=dtle.extractor delay=0 job=big_tx-migration timestamp=2022-03-24T17:08:24.674+0800
  1. check dest dtle log
2022-03-24T17:07:36.032+0800 [DEBUG] client.driver_mgr.dtle: ApplyEventQueries. exec: driver=dtle job=big_tx-migration query="CREATE DATABASE /*!32312 IF NOT EXISTS*/ `action_db_1` /*!40100 DEFAULT CHARACTER SET latin1 */" @module=dtle.applier timestamp=2022-03-24T17:07:36.032+0800
2022-03-24T17:07:36.033+0800 [DEBUG] client.driver_mgr.dtle: ApplyEventQueries. after: driver=dtle nDumpEntry=1 @module=dtle.applier job=big_tx-migration timestamp=2022-03-24T17:07:36.033+0800
2022-03-24T17:07:36.033+0800 [DEBUG] client.driver_mgr.dtle: ApplyEventQueries: driver=dtle job=big_tx-migration rows=0 schema= table= @module=dtle.applier timestamp=2022-03-24T17:07:36.033+0800
2022-03-24T17:07:36.033+0800 [DEBUG] client.driver_mgr.dtle: ApplyEventQueries. exec: driver=dtle @module=dtle.applier job=big_tx-migration query="DROP TABLE IF EXISTS `action_db_1`.`big_tx`" timestamp=2022-03-24T17:07:36.033+0800
2022-03-24T17:07:36.034+0800 [DEBUG] client.driver_mgr.dtle: ApplyEventQueries. exec: driver=dtle @module=dtle.applier job=big_tx-migration query="CREATE TABLE `action_db_1`.`big_tx` (`id` INT(20) NOT NULL AUTO_INCREMENT,`val` LONGTEXT,PRIMARY KEY(`id`)) ENGINE = InnoDB AUTO_INCREMENT = 2050 DEFAULT CHARACTER SET = UTF8MB4" timestamp=2022-03-24T17:07:36.034+0800
2022-03-24T17:07:36.037+0800 [DEBUG] client.driver_mgr.dtle: ApplyEventQueries. after: driver=dtle @module=dtle.applier job=big_tx-migration nDumpEntry=0 timestamp=2022-03-24T17:07:36.037+0800
2022-03-24T17:07:36.196+0800 [DEBUG] client: updated allocations: index=22 total=1 pulled=0 filtered=1
2022-03-24T17:07:36.196+0800 [DEBUG] client: allocation updates: added=0 removed=0 updated=0 ignored=1
2022-03-24T17:07:36.196+0800 [DEBUG] client: allocation updates applied: added=0 removed=0 updated=0 ignored=1 errors=0
2022-03-24T17:07:46.031+0800 [DEBUG] client.driver_mgr.dtle: no binlogEntry for 10s: driver=dtle @module=dtle.applier job=big_tx-migration timestamp=2022-03-24T17:07:46.031+0800
2022-03-24T17:07:46.049+0800 [DEBUG] client: updated allocations: index=24 total=1 pulled=0 filtered=1
2022-03-24T17:07:46.049+0800 [DEBUG] client: allocation updates: added=0 removed=0 updated=0 ignored=1
2022-03-24T17:07:46.049+0800 [DEBUG] client: allocation updates applied: added=0 removed=0 updated=0 ignored=1 errors=0
2022-03-24T17:07:50.904+0800 [DEBUG] client.driver_mgr.dtle: Stats: driver=dtle @module=dtle.applier job=big_tx-migration timestamp=2022-03-24T17:07:50.903+0800
2022-03-24T17:07:50.904+0800 [DEBUG] client.driver_mgr.dtle: TimestampContext.GetDelay: driver=dtle delay=0 job=big_tx-migration @module=dtle.applier timestamp=2022-03-24T17:07:50.903+0800
2022-03-24T17:07:50.953+0800 [DEBUG] client.driver_mgr.dtle: SaveGtidForJob: driver=dtle @module=dtle.applier gtid= job=big_tx-migration timestamp=2022-03-24T17:07:50.953+0800
2022-03-24T17:07:55.953+0800 [DEBUG] client.driver_mgr.dtle: no copyRows for 10s.: driver=dtle @module=dtle.applier job=big_tx-migration timestamp=2022-03-24T17:07:55.952+0800
2022-03-24T17:07:56.031+0800 [DEBUG] client.driver_mgr.dtle: no binlogEntry for 10s: driver=dtle @module=dtle.applier job=big_tx-migration timestamp=2022-03-24T17:07:56.031+0800
2

Output of ./dtle version:**

9.9.9.9-master-7ca85ee

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions