flike / kingshard

A high-performance MySQL proxy
6.39k stars 1.23k forks source link

Kingshard处理zabbix数据库 #314

Open joew2016 opened 7 years ago

joew2016 commented 7 years ago

配置: schema : nodes: [node1,node2] default: node1 shard:

    db : zabbix
    table: history
    key: itemid
    nodes: [node2]
    type: hash
    locations: [4]

############################## 8589:20170212:224330.969 [Z3005] query failed: [1105] syntax error at position 91 [insert into history (itemid,clock,ns,value) values (25410,1486910610,861830188,99.923828); ] 8589:20170212:224332.975 [Z3005] query failed: [1105] syntax error at position 90 [insert into history (itemid,clock,ns,value) values (23252,1486910612,861655125,0.000000); ]

flike commented 7 years ago

value是关键字,需要替换。

joew2016 commented 7 years ago

那只有改Kingshard的代码了

joew2016 commented 7 years ago

如果要替换关键字需要改哪些代码

joew2016 commented 7 years ago

我将代码中的value换成ksvl后,编译完成还是会报错

joew2016 commented 7 years ago

zabbix中的好几个表都有value这个字段,更改zabbix的表结构和代码不太现实。作者能够帮忙解决这个value关键字的问题吗

flike commented 7 years ago

我抽空研究一下。

joew2016 commented 7 years ago

作者多费心了

welyss commented 5 years ago

这个估计修改下解析逻辑应该就好了,不过Zabbix,还有个坑需要填。。。。批量insert语句,同时多节点貌似不支持