incubator-hugegraph
incubator-hugegraph copied to clipboard
以Memory作为后端起服务时,使用Client删除元数据报错 Undefined vertex label: '~task'
Expected behavior 期望表现
成功删除元数据
Actual behavior 实际表现
报错
Exception in thread "main" class com.baidu.hugegraph.HugeException: Failed to update/query TaskStore
at com.baidu.hugegraph.exception.ServerException.fromResponse(ServerException.java:44)
at com.baidu.hugegraph.client.RestClient.checkStatus(RestClient.java:63)
at com.baidu.hugegraph.rest.RestClient.delete(RestClient.java:198)
at com.baidu.hugegraph.api.schema.EdgeLabelAPI.delete(EdgeLabelAPI.java:73)
at com.baidu.hugegraph.driver.SchemaManager.removeEdgeLabel(SchemaManager.java:135)
at com.baidu.hugegraph.example.SingleExample.lambda$main$4(SingleExample.java:181)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at com.baidu.hugegraph.example.SingleExample.main(SingleExample.java:180)
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Undefined vertex label: '~task'
Steps to reproduce the problem 复现步骤
- 以Memory作为后端启动服务
- 使用HugeClient添加一些数据,比如 SingleExample 的数据
- 删除元数据,报错
这个 BUG 是由于Memory后端没有把task相关的元数据添加到对应的表中,其他类型的后端(通用代码逻辑)是在 init-store的时候添加的,但是Memory后端是不需要init-store的,所以没有时机创建。