<p dir="auto">Tested and confirmed with Neo4j 2.1.6, 2.2.0-M01, 2.2.0-M02 using Neo4j.rb 4.1.0 and Neo4j-core 4.0.0 Ruby gems.</p>
<p dir="auto">Given two completely independent sessions, queries against the Cypher transactional appear to be leaking IDs, resulting in errors in one session that reference nodes in the other.</p>
<p dir="auto">In session 1:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Benchmark.ips do |x|
  x.config(warmup: 3, time: 20)
  x.report('create/destroy') do
    s = Student.create
    s.destroy
  end
end"><pre class="notranslate"><code class="notranslate">Benchmark.ips do |x|
  x.config(warmup: 3, time: 20)
  x.report('create/destroy') do
    s = Student.create
    s.destroy
  end
end
</code></pre></div>
<p dir="auto"><code class="notranslate">Benchmark.ips</code> runs the given commands as many times as it can for the duration given.</p>
<p dir="auto">The queries against the server are <code class="notranslate">CREATE (s:Student { uuid: {uuid} ) RETURN s</code> and <code class="notranslate">MATCH (s) WHERE ID(s) = {id_of_s} OPTIONAL MATCH s-[r]-() DELETE s,r</code>. Each is an independent transaction. Four queries total: cypher query then commit to create, cypher query then commit to destroy. Uniqueness on the Student's uuid is enforced through a constraint.</p>
<p dir="auto">In session 2:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# Manually, repeatedly
Student.count"><pre class="notranslate"><code class="notranslate"># Manually, repeatedly
Student.count
</code></pre></div>
<p dir="auto">Session 2 will occasionally eventually return an <code class="notranslate">org.neo4j.cypher.EntityNotFoundException</code> error referencing Node with ID 429, which is a node created by session <strong>1</strong>.</p>
<p dir="auto">This appears to be the same issue as <a href="http://stackoverflow.com/questions/26133131/are-neo4js-cypher-transactions-broken" rel="nofollow">http://stackoverflow.com/questions/26133131/are-neo4js-cypher-transactions-broken</a>. The poster said they would open an issue but if they did, I couldn't find it.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="neo4j-sh (0)$ CREATE CONSTRAINT ON (p:Person) ASSERT p.id IS UNIQUE;
+-------------------+
| No data returned. |
+-------------------+
Constraints added: 1
815 ms
neo4j-sh (0)$ MERGE (i:Item {id:1})
&gt;  MERGE (p:Person {id:1});
+-------------------+
| No data returned. |
+-------------------+
Nodes created: 2
Properties set: 2
Labels added: 2
268 ms
neo4j-sh (0)$ MERGE (i:Item {id:2})
&gt;  MERGE (p:Person {id:1});
CypherExecutionException: Node 2 already exists with label Person and property &quot;id&quot;=[1]"><pre class="notranslate"><code class="notranslate">neo4j-sh (0)$ CREATE CONSTRAINT ON (p:Person) ASSERT p.id IS UNIQUE;
+-------------------+
| No data returned. |
+-------------------+
Constraints added: 1
815 ms
neo4j-sh (0)$ MERGE (i:Item {id:1})
&gt;  MERGE (p:Person {id:1});
+-------------------+
| No data returned. |
+-------------------+
Nodes created: 2
Properties set: 2
Labels added: 2
268 ms
neo4j-sh (0)$ MERGE (i:Item {id:2})
&gt;  MERGE (p:Person {id:1});
CypherExecutionException: Node 2 already exists with label Person and property "id"=[1]
</code></pre></div>