yugong 增量同步问题

xtfmy6hx  于 2022-11-19  发布在  Go
关注(0)|答案(1)|浏览(197)

增量同步问题

我的数据和流程是这样的:
insert into yugong_example_a values(1,'ljh','agapple',10.2,100, NULL , NULL ,sysdate,sysdate);
insert into yugong_example_a values(2,'yugong','yugong',16.88,2088, NULL , NULL ,sysdate,sysdate);
insert into yugong_example_a values(3,'test','test',88,188, NULL , NULL ,sysdate,sysdate);
commit;

起动YUGONG ,目标MYSQL 库是 正常同步了
现在 在源库操作
update yugong_example_a set alias_name = 'superman' where id = 1;
commit;

源库有条记录
select * from Mlog$_yugong_example_a
没有消费

代码是
public class YugongExampleADataTranslator extends AbstractDataTranslator implements DataTranslator {

private Logger logger = LoggerFactory.getLogger(YugongExampleADataTranslator.class);

public boolean translator(Record record) {

// record.setSchemaName("uetest");
record.setTableName("yugong_example_mysql_a");
// 源表为yugong_example_a,目标表为yugong_example_mysql_a

ColumnValue id = record.getColumnByName("id");
    logger.error("======="+id.getValue());

我刚才的问题打印的日志是

17:53:35.714 [main] WARN c.t.yugong.extractor.oracle.OracleRecRecordExtractor - mlog[MLOG$_YUGONG_EXAMPLE_A] is exist, just have fun.
17:53:35.823 [main] INFO c.t.y.e.o.OracleFullRecordExtractor$ContinueExtractor - UECHN_DB.YUGONG_EXAMPLE_A start postion:0
17:53:35.829 [main] INFO com.taobao.yugong.controller.YuGongInstance - table[UECHN_DB.YUGONG_EXAMPLE_A] start successful. extractor:com.taobao.yugong.extractor.oracle.OracleAllRecordExtractor , applier:com.taobao.yugong.applier.AllRecordApplier, translator:com.taobao.yugong.translator.YugongExampleADataTranslator
17:53:36.315 [YuGongInstance-UECHN_DB.YUGONG_EXAMPLE_A] ERROR c.taobao.yugong.translator.YugongExampleADataTranslator - =======1
17:53:36.318 [YuGongInstance-UECHN_DB.YUGONG_EXAMPLE_A] ERROR c.taobao.yugong.translator.YugongExampleADataTranslator - =======2
17:53:36.318 [YuGongInstance-UECHN_DB.YUGONG_EXAMPLE_A] ERROR c.taobao.yugong.translator.YugongExampleADataTranslator - =======3
17:53:36.352 [YuGongInstance-UECHN_DB.YUGONG_EXAMPLE_A] INFO c.t.yugong.extractor.oracle.OracleAllRecordExtractor - table [UECHN_DB.YUGONG_EXAMPLE_A] full extractor is end , next auto start inc extractor
17:53:37.812 [YuGongInstance-UECHN_DB.YUGONG_EXAMPLE_A] INFO c.t.y.e.oracle.OracleMaterializedIncRecordExtractor - table[UECHN_DB.YUGONG_EXAMPLE_A] now is CATCH_UP ...
17:53:37.908 [YuGongInstance-UECHN_DB.YUGONG_EXAMPLE_A] ERROR c.taobao.yugong.translator.YugongExampleADataTranslator - =======3
17:53:38.079 [YuGongInstance-UECHN_DB.YUGONG_EXAMPLE_A] INFO c.t.y.e.oracle.OracleMaterializedIncRecordExtractor - table[UECHN_DB.YUGONG_EXAMPLE_A] now is NO_UPDATE ...
17:53:39.258 [YuGongInstance-UECHN_DB.YUGONG_EXAMPLE_A] INFO c.t.y.e.oracle.OracleMaterializedIncRecordExtractor - table[UECHN_DB.YUGONG_EXAMPLE_A] now is NO_UPDATE ...
17:53:40.397 [YuGongInstance-UECHN_DB.YUGONG_EXAMPLE_A] INFO c.t.y.e.oracle.OracleMaterializedIncRecordExtractor - table[UECHN_DB.YUGONG_EXAMPLE_A] now is NO_UPDATE ...
17:53:41.489 [YuGongInstance-UECHN_DB.YUGONG_EXAMPLE_A] INFO c.t.y.e.oracle.OracleMaterializedIncRecordExtractor - table[UECHN_DB.YUGONG_EXAMPLE_A] now is NO_UPDATE ...
17:53:42.493 [YuGongInstance-UECHN_DB.YUGONG_EXAMPLE_A] INFO com.taobao.yugong.controller.YuGongInstance - table[UECHN_DB.YUGONG_EXAMPLE_A] is end by NO_UPDATE
17:53:42.494 [YuGongInstance-UECHN_DB.YUGONG_EXAMPLE_A] INFO com.taobao.yugong.common.stats.StatAggregation - {总记录数:4,采样记录数:4,同步TPS:1,最长时间:1638,最小时间:510,平均时间:1074}
17:53:42.497 [pool-2-thread-1] INFO com.taobao.yugong.controller.YuGongInstance - table[UECHN_DB.YUGONG_EXAMPLE_A] stop successful.

另外 /yugong/logs/yugong/table.log 也是
19:38:37.799 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed
19:38:37.907 [main] INFO com.alibaba.druid.pool.DruidDataSource - {dataSource-2} closed
19:38:37.908 [main] INFO com.taobao.yugong.YuGongLauncher - ## YuGong is down.
在yugong 运行过程中,修改源库表中的记录,yugong 目录下的 UECHN_DB.YUGONG_EXAMPLE_A
table.log,extractor.log,applier.log 记录并没有改变

很奇怪的是
update yugong_example_a set alias_name = 'superman' where id = 1;

为什么打印 17:53:37.908 [YuGongInstance-UECHN_DB.YUGONG_EXAMPLE_A] ERROR c.taobao.yugong.translator.YugongExampleADataTranslator - =======3

uqcuzwp8

uqcuzwp81#

建议debug一下代码流程吧,还没遇到过类似问题

相关问题