title: Can't serialize due to concurrent operations: memgraph
body: <p>I am performing mix of queries(reads/write/updates/deletes) to a single memgraph instance.
  To do the same I am using Java client by Neo4j, all the APIs I am currently using are sync APIs from the driver.</p>
  <p>Nature of queries in my case is such that I can execute them concurrently with no side effects. For better performance  I am firing the queries in parallel. The error I am getting is for a <code>CREATE</code> operation where I am creating an edge between two nodes. This is consistent as I tried running this same setup multiple times and every time, all queries go through except it crashes when it comes to this create edge stage.</p>
  <p>Query for reference:</p>
  <pre><code>OPTIONAL MATCH (node1) WHERE id(node1) = $nodeId1
  OPTIONAL MATCH (node2) WHERE id(node2) = $nodeId2
  CREATE (node1)-[:KNOWS]-&gt; (node2)
  </code></pre>
  <p>I am not able to find any documentation around any such error. Please point me to some document like this or any workaround using which I can ask memgraph to put the query on hold if same objects are being operated by some other query.</p>
  <p>One approach I am thinking is just implement retry for any such failed queries, but I am looking for a cleaner approach.</p>
  <p>P.S. I was running the same setup on Neo4j earlier and did not encounter any problems with it.</p>