incubator-hugegraph icon indicating copy to clipboard operation
incubator-hugegraph copied to clipboard

[Bug] Inconsistent driver version null error in Cassandra 4.x

Open zhouzilong121 opened this issue 2 years ago • 4 comments
trafficstars

Bug Type (问题类型)

server status (启动/运行异常)

Before submit

  • [X] 我已经确认现有的 IssuesFAQ 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)

Environment (环境信息)

  • Server Version: 1.0.0 (Apache Release Version)
  • Backend: cassandra4.0.11 * 3
  • OS: 8 CPUs, 32G RAM / 16G RAM, Ubuntu 22.04
  • Data Size: 11W vertices, 14W edges

Expected & Actual behavior (期望与实际表现)

我在使用 hugegraph 连接 Cassandra 时,第一次可以正常连接

在关闭重启hugegraph服务的时候报错The backend driver version '1.11' is inconsistent with the data version 'null' of backend store for graph 'SKG'。

报错是在使用hugegraph-loader导入数据后会重复出现,不进行导入数据时直接进行重启是不会出现报错的。并且关注cassandra数据时它的数据发布是不均匀的,节点1和节点2为54M数据,节点3为300KB。

Vertex/Edge example (问题点 / 边数据举例)

No response

Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

No response

zhouzilong121 avatar Aug 14 '23 10:08 zhouzilong121

same issue encountered also in server version 1.3.0.

linehrr avatar Apr 18 '24 03:04 linehrr

same issue encountered also in server version 1.3.0.

@linehrr Thanks for your feedback, could u provide the minimum reproduction process for us? (we could fix it soon)

And if it restarts the server when it does not import data, it will return to OK/normal?

imbajin avatar Apr 18 '24 09:04 imbajin

@imbajin ok I found the root cause and some workaround: root cause is that I called clearGraph() function in the code, so that I can clean up the graph and start from scratch. however the clearGraph() function also truncated the cassandra table m which holds the meta info like version. hugeClient.graphs().clearGraph("hugegraph", "I'm sure to delete all data")

then to fix this I did: insert into m(name, value) values ('VERSION', '1.11');

this repopulates the version to the version that driver expected. and now my servers start up with no issue.

the proper fix would be exclude table m in the purge procedure.

linehrr avatar Apr 18 '24 14:04 linehrr

@imbajin ok I found the root cause and some workaround: root cause is that I called clearGraph() function in the code, so that I can clean up the graph and start from scratch. however the clearGraph() function also truncated the cassandra table m which holds the meta info like version. hugeClient.graphs().clearGraph("hugegraph", "I'm sure to delete all data")

then to fix this I did: insert into m(name, value) values ('VERSION', '1.11');

this repopulates the version to the version that driver expected. and now my servers start up with no issue.

the proper fix would be exclude table m in the purge procedure.

@linehrr thanks for the useful feedback/details, we'll add the truncate case in unit-test & enhance the clear/drop graph logic(also it's good task for the new contributor)

@dosu-bot could u response for this legacy issue?

imbajin avatar Apr 18 '24 15:04 imbajin