apache / incubator-hugegraph

A graph database that supports more than 100+ billion data, high performance and scalability (Include OLTP Engine & REST-API & Backends)
https://hugegraph.apache.org
Apache License 2.0
2.65k stars 518 forks source link

hugegraph0.11连接cassandra作为后端,初始化报错 #1347

Closed lixuanhng closed 3 years ago

lixuanhng commented 3 years ago

Expected behavior 期望表现

表现正常,如gitbook中初始化结果所示

Actual behavior 实际表现

执行初始化命令之后,报错,结果如下: 2021-01-25 17:55:34 1048 [main] [INFO ] com.baidu.hugegraph.cmd.InitStore [] - Init graph with config file: conf/hugegraph.properties 2021-01-25 17:55:35 1538 [main] [WARN ] com.datastax.driver.core.NettyUtil [] - Found Netty's native epoll transport, but not running on linux-based operating system. Using NIO instead. 2021-01-25 17:55:35 1936 [main] [WARN ] com.datastax.driver.core.Cluster [] - You listed localhost/0:0:0:0:0:0:0:1:9042 in your contact points, but it wasn't found in the control host's system.peers at startup 2021-01-25 17:55:36 2274 [main] [WARN ] com.datastax.driver.core.Cluster [] - You listed localhost/0:0:0:0:0:0:0:1:9042 in your contact points, but it wasn't found in the control host's system.peers at startup main dict load finished, time elapsed 593 ms model load finished, time elapsed 28 ms. 2021-01-25 17:55:37 3159 [main] [WARN ] com.datastax.driver.core.Cluster [] - You listed localhost/0:0:0:0:0:0:0:1:9042 in your contact points, but it wasn't found in the control host's system.peers at startup 2021-01-25 17:55:37 3595 [main] [INFO ] com.baidu.hugegraph.cmd.InitStore [] - Skip init-store due to the backend store of 'cassandra' had been initialized 2021-01-25 17:55:37 3596 [main] [ERROR] com.baidu.hugegraph.HugeGraph [] - The backend driver version '1.9' is inconsistent with the data version '1.7' of backend store for graph 'cassandra' 2021-01-25 17:55:37 3596 [main] [INFO ] com.baidu.hugegraph.HugeGraph [] - Close graph standardhugegraph[cassandra] 2021-01-25 17:55:44 10326 [Thread-1] [INFO ] com.baidu.hugegraph.HugeGraph [] - HugeGraph is shutting down Initialization finished.

Steps to reproduce the problem 复现步骤

  1. 之前使用hugegraph0.10,后端存储在cassandra(版本3.11);现在本地mac环境下部署0.11版本的hugegragh。
  2. hugegraph.properties的配置如下:
backend=cassandra
serializer=cassandra
store=cassandra

还修改了cassandra的ip及端口号,其余项保持默认不变

  1. 看报错内容是本地backend driver version与后端存储的数据版本不兼容。可是我不明白的是1.9和1.7是什么的版本啊?cassandra的版本不是3吗?

我在想是不是因为直接对cassandra有过使用的记录,即cassandra里面是有导入数据的,那在初始化hugegraph-server时是否回去检查cassandra中是否为空的情况?

请指教,感谢!

imbajin commented 3 years ago

我在想是不是因为直接对cassandra有过使用的记录,即cassandra里面是有导入数据的,那在初始化hugegraph-server时是否回> 去检查cassandra中是否为空的情况?

应该是, 检验方式其实也很简单, 你先把之前得 keyspace (DB) 手动删除一下, 再重新再0.11初始化启动就知道了. 或者你干脆换个 store 名字, 比如 cassandra2 初始化也可以确定.

一般大版本的升级, 都可能带来数据结构上的变化, 导致底层存储是不兼容旧版本数据的 之后应该会加一个 Breaking Change 这样的提示在 release notes 里, 以免大家不清楚是否向下兼容 (并附一个升级指南)