Violation of UNIQUE INDEX deleted the property from the all the all ready existed vertex

Skip to first unread message

Jun 12, 2020, 10:04:22 AM6/12/20
to JanusGraph developers

i have created a Unique Composite Index for vertices with id, name properties.
  1. create a vertex with an id(-109), name("test").
  2. take the already created vertex which is having different id(-201654672484678624),name('test") which are having few properties like age, createdTime, gender, etc
  3. try to update the already available vertex stated in point 2 with id(-109) of vertex stated in point 1
  4. then the following exception is thrown which is expected
    1. Adding this property for key [id] and value [-109] violates a uniqueness constraint [newUniqueIndex]Type ':help' or ':h' for help.Display stack trace? [yN]yorg.janusgraph.core.SchemaViolationException: Adding this property for key [id] and value [-109] violates a uniqueness constraint [newUniqueIndex]{{ at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.addProperty(}}{{ at org.janusgraph.graphdb.transaction.StandardJanusGraphTx.addProperty(}}{{ at}}{{ at}}{{ at}}{{}}
  5. But the unexpected thing happening is the id(-201654672484678624) property of the vertex stated in point is removed from it
Note: i am using cassandra as backend and ES for indexing

can you please help me to solve the issue as there is a loss in data as we can't retrive the data which is lost.

attaching the console logs of reproducing the issue through gremlin console

Krishna Jalla
Reply all
Reply to author
0 new messages