You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hugegraph.apache.org by GitBox <gi...@apache.org> on 2022/09/21 11:42:18 UTC
[GitHub] [incubator-hugegraph] cbb0610 commented on issue #1964: mysql作为存储后端,一段时间后插入数据失败
cbb0610 commented on issue #1964:
URL: https://github.com/apache/incubator-hugegraph/issues/1964#issuecomment-1253586719
稳定复现的,来回多创建几次label 和index mysql5.7.30 task 表是什么?,我的操作代码是 : 都是执行到 插入conceptId index 报错了
HugeClient client = getLocalClient(concept.getKg().getId());
SchemaManager schema = client.schema();
//创建概念顶点类型
schema.vertexLabel(concept.getIdentifier())//值为概念标识
.properties("name", "conceptId","entityId")
.ifNotExist()
.create();
//给概念顶点类型添加索引
schema.indexLabel(concept.getIdentifier().hashCode()+"_name_index")
.onV(concept.getIdentifier())
.by("name")
.secondary()
.ifNotExist()
.create();
schema.indexLabel(concept.getIdentifier().hashCode()+"_conceptId_index")
.onV(concept.getIdentifier())
.by("conceptId")
.secondary()
.ifNotExist()
.create();
schema.indexLabel(concept.getIdentifier().hashCode()+"_entityId_index")
.onV(concept.getIdentifier())
.by("entityId")
.secondary()
.ifNotExist()
.create();
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org