'canal adapter deal with ddl and dml ,I don't understand the order in which they are executed
the code in com.alibaba.otter.canal.client.adapter.rdb.service.RdbMirrorDbSyncService#sync:
if (dml.getIsDdl() != null && dml.getIsDdl() && StringUtils.isNotEmpty(dml.getSql())) {
// executing DDL
...
executeDdl(mirrorDbConfig, dml);
....
} else {
// DML add to the list
initMappingConfig(dml.getTable(), mirrorDbConfig.getMappingConfig(), mirrorDbConfig, dml);
dmlList.add(dml);
}
}
if (!dmlList.isEmpty()) { // d
// doing dml list
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|