主表有 430 万数据,关联表有 220 万数据,是多对一的关系,理论上同步后会有 430 万数据。 用的 canal adapter 同步到 ES 。
实际上: 数据全量导入完成, 一共导入 4134977 条数据, 耗时: 7995600
过程中有报错如下:
2021-11-17 02:11:21.710 [pool-3-thread-4] ERROR com.alibaba.otter.canal.client.adapter.support.Util - sqlRs has error, sql: 这里是我的 SQL LIMIT 4240000,10000 2021-11-17 02:11:21.711 [pool-3-thread-4] ERROR c.a.otter.canal.client.adapter.es7x.etl.ESEtlService - com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 60000, active 3, maxActive 3, creating 0 java.lang.RuntimeException: com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 60000, active 3, maxActive 3, creating 0 at com.alibaba.otter.canal.client.adapter.support.Util.sqlRS(Util.java:65) ~[client-adapter.common-1.1.5.jar:na] at com.alibaba.otter.canal.client.adapter.es7x.etl.ESEtlService.executeSqlImport(ESEtlService.java:64) ~[na:na] at com.alibaba.otter.canal.client.adapter.support.AbstractEtlService.lambda$importData$1(AbstractEtlService.java:91) [client-adapter.common-1.1.5.jar:na] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_221] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_221] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_221] at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_221] Caused by: com.alibaba.druid.pool.GetConnectionTimeoutException: wait millis 60000, active 3, maxActive 3, creating 0 at com.alibaba.druid.pool.DruidDataSource.getConnectionInternal(DruidDataSource.java:1749) ~[druid-1.2.6.jar:1.2.6] at com.alibaba.druid.pool.DruidDataSource.getConnectionDirect(DruidDataSource.java:1419) ~[druid-1.2.6.jar:1.2.6] at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1399) ~[druid-1.2.6.jar:1.2.6] at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1389) ~[druid-1.2.6.jar:1.2.6] at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:100) ~[druid-1.2.6.jar:1.2.6] at com.alibaba.otter.canal.client.adapter.support.Util.sqlRS(Util.java:50) ~[client-adapter.common-1.1.5.jar:na] ... 6 common frames omitted
全量同步的过程中有数据的更新及插入操作。有没有办法解决这个问题呢?
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.