alibaba / otter

阿里巴巴分布式数据库同步系统(解决中美异地机房)
Apache License 2.0
8.07k stars 2.49k forks source link

DDL sync failed, no table found of ex log #1034

Open 15898317421 opened 2 years ago

15898317421 commented 2 years ago

When I create table with sql like this: CREATE TABLE demo ( id bigint(20) NOT NULL AUTO_INCREMENT , create_time datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP , update_time datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP , create_by varchar(255) NOT NULL DEFAULT '' , update_by varchar(255) NOT NULL DEFAULT '' , PRIMARY KEY (id), ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

Then I insert a row, the ex will be log, the log of pipeline like this: pid:16 nid:2 exception:setl:com.google.common.collect.ComputationException: org.apache.commons.lang.exception.NestableRuntimeException: find table [otter2.demo] error at com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:889) at com.alibaba.otter.node.etl.common.db.dialect.AbstractDbDialect.findTable(AbstractDbDialect.java:109) at com.alibaba.otter.node.etl.common.db.dialect.AbstractDbDialect.findTable(AbstractDbDialect.java:113) at com.alibaba.otter.node.etl.transform.transformer.RowDataTransformer.transform(RowDataTransformer.java:135) at com.alibaba.otter.node.etl.transform.transformer.RowDataTransformer.transform(RowDataTransformer.java:55) at com.alibaba.otter.node.etl.transform.transformer.OtterTransformerFactory.transform(OtterTransformerFactory.java:79) at com.alibaba.otter.node.etl.transform.TransformTask$1.run(TransformTask.java:86) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) at java.util.concurrent.FutureTask.run(FutureTask.java) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.apache.commons.lang.exception.NestableRuntimeException: find table [otter2.demo] error at com.alibaba.otter.node.etl.common.db.dialect.AbstractDbDialect$2.apply(AbstractDbDialect.java:188) at com.alibaba.otter.node.etl.common.db.dialect.AbstractDbDialect$2.apply(AbstractDbDialect.java:172) at com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:356) at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:182) at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:151) at com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:67) at com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:885) ... 12 more Caused by: org.apache.commons.lang.exception.NestableRuntimeException: no found table [otter2.demo] , pls check at com.alibaba.otter.node.etl.common.db.dialect.AbstractDbDialect$2.apply(AbstractDbDialect.java:182) ... 18 more

I guess this is a bug

15898317421 commented 2 years ago

@agapple

linqh1 commented 2 years ago

Let's say you create a synchronization between database A and database B, and you execute sql(create table) on database A.

Then you should open ddl at the pipeline whose sync direction is from A to B

image

15898317421 commented 2 years ago

Let's say you create a synchronization between database A and database B, and you execute sql(create table) on database A.

Then you should open ddl at the pipeline whose sync direction is from A to B

image

yes, this config is enable, but it doesn't work

linqh1 commented 2 years ago

Let's say you create a synchronization between database A and database B, and you execute sql(create table) on database A. Then you should open ddl at the pipeline whose sync direction is from A to B image

yes, this config is enable, but it doesn't work

Do you click "推送" button and restart channel after change pipeline configuration?

image

linqh1 commented 2 years ago

你是不是ddl开错边了? 在另外一个数据库创建表然后插入数据,看能不能同步过来

15898317421 commented 2 years ago

Let's say you create a synchronization between database A and database B, and you execute sql(create table) on database A. Then you should open ddl at the pipeline whose sync direction is from A to B image

yes, this config is enable, but it doesn't work

Do you click "推送" button and restart channel after change pipeline configuration?

image

do not click

15898317421 commented 2 years ago

你是不是ddl开错边了? 在另外一个数据库创建表然后插入数据,看能不能同步过来

when I test this scene, I repaeat some times, then I found some tables can sync, but some can not.