incubator-hugegraph
incubator-hugegraph copied to clipboard
批量数据HugeGraph server 入库,是否支持graph 多次open close
if (i % 1000000 == 0) { //每1000000 提交一次 进行一次事物关闭,打开操作 graph.closeTx() g.close() graph.close()
graph = HugeFactory.open(hugeProperties)
g = graph.traversal()
graph.tx().open()
}
Expected behavior 期望表现
{type something here...} 期待程序可以正常入库
Actual behavior 实际表现
{type something here...}
- 入顶点时,graph 可以多次 open close 操作
- 入边时 当执行: srcVertex.addEdge('label',dstVertex) 报错: Exception in thread "main" java.lang.IllegalStateException: Graph 'hugegraph[hugegraph_test_2019_04_11]' has been closed at com.google.common.base.Preconditions.checkState(Preconditions.java:199) at com.baidu.hugegraph.util.E.checkState(E.java:68) at com.baidu.hugegraph.HugeGraph.checkGraphNotClosed(HugeGraph.java:274) at com.baidu.hugegraph.HugeGraph.schemaTransaction(HugeGraph.java:293) at com.baidu.hugegraph.HugeGraph.edgeLabel(HugeGraph.java:429) at com.baidu.hugegraph.structure.HugeVertex.addEdge(HugeVertex.java:251) at com.baidu.hugegraph.structure.HugeVertex.addEdge(HugeVertex.java:60)
但是实际上: grpah 处于打开状态 graph.schemaTransaction() 也是可以使用的
Steps to reproduce the problem 复现步骤
- {step 1}
- {step 2}
- {step 3}
Status of loaded data 数据状态
Vertex/Edge summary 数据量
- loaded vertices amount: {like 10 million}
- loaded edges amount: {like 20 million}
- loaded time: {like 200s}
Vertex/Edge example 数据示例
{type something here...}
Schema(VertexLabel, EdgeLabel, IndexLabel) 元数据结构
{type something here...}
Specifications of environment 环境信息
- hugegraph version: {like v0.7.4}
- operating system: {like centos 7.4, 32 CPUs, 64G RAM}
- hugegraph backend: {like cassandra 3.10, cluster with 20 nodes, 3 x 1TB HDD disk each node}
@ChenBinaBGitHub close之后的图是不允许再使用的。
好的,谢谢
Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label