0

The Load operation on Neptune failed due to the deletion of files from s3 in between the s3 to Neptune load. Since then I am able to delete all the relationships that are present between nodes through opencypher query but unable to delete nodes.

gets error {"detailedMessage":"Operation failed due to conflicting concurrent operations (please retry), 0 transactions are currently rolling back.","code":"ConcurrentModificationException" even after retrying many times.

The query used for deleting all nodes is query=MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE n,r

Sujith Kumar
  • 872
  • 6
  • 19
  • Do you actually have any edges/relationships left in the graph? Does the CME also also happen if you do `MATCH (n) DETACH DELETE n` ? Which Amazon Neptune engine version are you using? How many nodes are currently in the graph? – Kelvin Lawrence Mar 27 '23 at 14:44

2 Answers2

0

It appears that query is attempting to drop the entire graph. An easier way to do that with Neptune is to use the Fast Reset API. https://docs.aws.amazon.com/neptune/latest/userguide/manage-console-fast-reset.html

This feature is also available via a Neptune Notebook by using the %db_reset Jupyter magic.

This will delete everything within a couple of seconds by resetting the cluster back to its original empty state.

Taylor Riggan
  • 1,963
  • 6
  • 12
0

This issue is resolved adding limit to the query "MATCH (n) WITH n LIMIT 100000 DETACH DELETE n" . Running this query in recursive solves the problem.