incubator-hugegraph icon indicating copy to clipboard operation
incubator-hugegraph copied to clipboard

Lock error thrown when modifying schema and data dynamically

Open xuekang99 opened this issue 8 years ago • 1 comments

The schema created at the beginning can't satisfy our requirement, so we have to modify the schema to load data into the database. When we modify the schema and invoke setProperty method, the following exception thrown:

com.baidu.hugegraph.exception.ServerException: Lock [il_delete:35] is locked by other operation
	at com.baidu.hugegraph.exception.ServerException.fromResponse(ServerException.java:44) ~[hugegraph-client-1.5.8.jar:1.5.8.0]
	at com.baidu.hugegraph.client.RestClient.checkStatus(RestClient.java:63) ~[hugegraph-client-1.5.8.jar:1.5.8.0]
	at com.baidu.hugegraph.rest.RestClient.put(RestClient.java:142) ~[hugegraph-common-1.4.9.jar:1.4.9.0]
	at com.baidu.hugegraph.api.graph.VertexAPI.append(VertexAPI.java:70) ~[hugegraph-client-1.5.8.jar:1.5.8.0]
	at com.baidu.hugegraph.driver.GraphManager.appendVertexProperty(GraphManager.java:143) ~[hugegraph-client-1.5.8.jar:1.5.8.0]
	at com.baidu.hugegraph.structure.graph.Vertex.setProperty(Vertex.java:73) ~[hugegraph-client-1.5.8.jar:1.5.8.0]
	at com.baidu.hugegraph.structure.graph.Vertex.property(Vertex.java:63) ~[hugegraph-client-1.5.8.jar:1.5.8.0]
	at com.baidu.hugegraph.structure.graph.Vertex.property(Vertex.java:30) ~[hugegraph-client-1.5.8.jar:1.5.8.0]
	at com.baidu.hugedragon.repository.graphdb.hugegraph.HugeGraphElement.setProperty(HugeGraphElement.java:118) ~[classes/:?]
	... 19 more

Steps to reproduce

  • Create a vertex label
  • Add a property key
  • Add a property with property key created in last step in the vertex label
  • Set value for the new created property

Environments

  • hugegraph-client 1.5.8
  • hugegraph-core 0.7.4

xuekang99 avatar Aug 24 '18 10:08 xuekang99

This is indeed a bug, because the IndexLabel on the server may generate asynchronous tasks internally when it is created, but it does not return the taskId externally, causing the interface to behave as a synchronous operation, but it is actually an asynchronous operation. We are working on repairing.

Linary avatar Aug 27 '18 07:08 Linary