Neo4J 2.1.3 Uniqueness Constraint Being Violated, Is This A Bug?

回眸只為那壹抹淺笑 提交于 2019-12-06 02:53:44

问题


We have a Neo4J 2.1.3 database and we have a uniqueness constraint that was created as follows:

CREATE CONSTRAINT ON (segment:SEGMENT) ASSERT segment.segmentId IS UNIQUE

When we test this from the browser, it works fine in detecting violations, e.g:

CREATE (n:SEGMENT {name : "duplicate", segmentId : 110484}) RETURN n

results in

Node 589 already exists with label SEGMENT and property "segmentId"=[110484]

Neo.ClientError.Schema.ConstraintViolation

which is fine.

We have a load tester setup with 3 machines and multiple threads per box using Cypher over REST talking to Neo4J and using the transactional endpoints to do creates similar to above (but of course many more properties relevant to our app), and always writing to the Neo4J master in an HA setup.

We can reliably reproduce in that setup multiple violations of the uniqueness constraint that are NOT caught by Neo4J, they execute without error and in the resulting db we can see multiple nodes with the SEGMENT label and the same value for the segmentId property (we are intentionally generating duplicate segmentId values for our test).

Anyone else run into the same issue? Is this a Neo4J bug?

Thanks.

来源:https://stackoverflow.com/questions/25878581/neo4j-2-1-3-uniqueness-constraint-being-violated-is-this-a-bug

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!