Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataX /tdengine30writer BUG #44

Open
Allen-zy opened this issue Aug 23, 2023 · 0 comments
Open

DataX /tdengine30writer BUG #44

Allen-zy opened this issue Aug 23, 2023 · 0 comments

Comments

@Allen-zy
Copy link

Describe the bug 描述你遇到的问题

通过datax把mongodb中多个集合数据导入到tdengine中的同一个超级表时报OOM,可复现的现象是导入第一个mongodb集合成功,第二个集合开始就失败报OOM

使用的数据库和datax版本
Mongodb:4.0.3
Tdengine:3.0.5.0
Datax:mongodbreader,tdengine30writer

To Reproduce 如何重现问题
1:tdengine新建数据库
2:mongo中有待迁移集合N个,每个集合上亿条数据
3:当tdengine待迁移的超级表中无数据时,迁移任意一个mongo集合到tdengine中都可以成功
4:当待迁移tdengine库的超级表中已有上亿条数据后,再通过datax迁移mongodb任意一个集合(包括之前迁移成功的集合)数据时datax发生OOM

问题排查过程
1:调大datax内存到6G,一样发生OOM
2:排除datax配置问题
3:datax发生OOM期间tdengine数据库cpu高启,源端mongodb无导出流量显示,判断为在mongodb数据导出前datax发生的OOM
系统监控截图
image
追踪hprof文件后,定位到datax问题源码的截图:
image
直接在tdengine中执行sql,复现了一样的问题,判断是datax把所有tagid给加载到了datax的内存中,导致OOM
image
Expected behavior 期待修复的效果
不是很确定为什么datax需要执行下面的代码,感觉意义不大,是否可以屏蔽掉或者只抓取每个子表tagid就行了,不需要加载具体明细tagid数据

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant