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.58k stars 512 forks source link

[Question] gremlin console写入边如何配置不检查顶点是否存在 #2428

Closed ycycyccc closed 4 months ago

ycycyccc commented 5 months ago

Problem Type (问题类型)

configs (配置项 / 文档相关)

Before submit

Environment (环境信息)

Your Question (问题描述)

gremlin console写入边时如何配置不检查顶点是否存在?或者是否可以全局配置check_vertex=false,写入时就不必再配置

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

hugegraph.traversal().addE('xxx').from(__.V('aaa')).to(__.V('bbb')).property('name','ab')

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

No response

dosubot[bot] commented 5 months ago

🤖

你好,@ycycyccc!很高兴再次看到你的问题。希望你一切都好。

写入边时检查顶点是否存在的配置是在hugegraph-core模块的GraphTransaction类中设置的。配置选项是VERTEX_ADJACENT_VERTEX_EXIST,在GraphTransaction构造函数中设置:

this.checkAdjacentVertexExist = conf.get(CoreOptions.VERTEX_ADJACENT_VERTEX_EXIST);

此配置是从传递给GraphTransaction构造函数的HugeConfig对象中读取的。HugeConfig对象在启动HugeGraph服务器时使用配置文件进行初始化。

要设置全局配置check_vertex=false,您需要在用于初始化HugeConfig对象的配置文件中将VERTEX_ADJACENT_VERTEX_EXIST选项设置为false。配置文件通常命名为hugegraph.properties,位于HugeGraph服务器的conf目录中。

请注意,更改此配置可能会影响图数据库的数据一致性和完整性。建议在更改此配置之前了解其含义。 参考源码:

hugegraph.properties配置文件位于incubator-hugegraph代码库的hugegraph-server/hugegraph-core/src/main/resources/目录中。 参考源码:

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

github-actions[bot] commented 5 months ago

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