CreditEaseDBA / Themis

数据库审核平台
Apache License 2.0
346 stars 167 forks source link

BIG_TABLE_BY_SIZE 问题 #11

Closed himura-kenshin closed 7 years ago

himura-kenshin commented 7 years ago

BIG_TABLE_BY_SIZE mongo里面默认是 10 单位GB ,而脚本里面 table_size = kwargs.get("table_size") 取到的是 10 ,sql里面比较的时候 单位 没有换算 data_length>@table_size@

dikang123 commented 7 years ago

image 我发现报的错,基本上都是: InvalidDocument: Cannot encode object: Decimal('13')

会不会是mongodb对Decimal类型的支持问题?

himura-kenshin commented 7 years ago

mongo改成 "parm_desc": "表大小(GB)" "parm_name": "table_size" "parm_value": "NumberLong(10737418240)" "parm_unit": "GB" 报错 InvalidDocument: Cannot encode object: Decimal('13.27')

tuteng commented 7 years ago

请问这是在做哪部分审核时出的问题,对象,文本,执行计划,统计信息? 问题是,mongodb对decimal类型不支持,因此要找到对应的数据做类型转换

tuteng commented 7 years ago

https://github.com/CreditEaseDBA/Themis/commit/bcd16c2503c18910648ffa1f9610719812f5f30a 参考这里看看

himura-kenshin commented 7 years ago

是的 我也找到了 就是 return 的时候 有问题