{"action":"created","issue":{"url":"https://api.github.com/repos/neo4j/neo4j/issues/3864","labels_url":"https://api.github.com/repos/neo4j/neo4j/issues/3864/labels{/name}","comments_url":"https://api.github.com/repos/neo4j/neo4j/issues/3864/comments","events_url":"https://api.github.com/repos/neo4j/neo4j/issues/3864/events","html_url":"https://github.com/neo4j/neo4j/issues/3864","id":55244295,"number":3864,"title":"Transactions appear to leak data between sessions, resulting in EntityNotFoundException","user":{"login":"subvertallchris","id":4097271,"avatar_url":"https://avatars.githubusercontent.com/u/4097271?v=3","gravatar_id":"","url":"https://api.github.com/users/subvertallchris","html_url":"https://github.com/subvertallchris","followers_url":"https://api.github.com/users/subvertallchris/followers","following_url":"https://api.github.com/users/subvertallchris/following{/other_user}","gists_url":"https://api.github.com/users/subvertallchris/gists{/gist_id}","starred_url":"https://api.github.com/users/subvertallchris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/subvertallchris/subscriptions","organizations_url":"https://api.github.com/users/subvertallchris/orgs","repos_url":"https://api.github.com/users/subvertallchris/repos","events_url":"https://api.github.com/users/subvertallchris/events{/privacy}","received_events_url":"https://api.github.com/users/subvertallchris/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-01-23T04:36:17Z","updated_at":"2015-01-23T17:44:23Z","closed_at":null,"body":"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.\r\n\r\nGiven 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.\r\n\r\nIn session 1:\r\n\r\n```\r\nBenchmark.ips do |x|\r\n  x.config(warmup: 3, time: 20)\r\n  x.report('create/destroy') do\r\n    s = Student.create\r\n    s.destroy\r\n  end\r\nend\r\n```\r\n`Benchmark.ips` runs the given commands as many times as it can for the duration given.\r\n\r\nThe queries against the server are `CREATE (s:Student) RETURN s` and `MATCH (s) WHERE ID(s) = {id_of_s} OPTIONAL MATCH s-[r]-() DELETE s,r`. Each is an independent transaction. Four queries total: cypher query then commit to create, cypher query then commit to destroy..\r\n\r\nIn session 2:\r\n```\r\n# Manually, repeatedly\r\nStudent.count\r\n```\r\nSession 2 will occasionally eventually return an `org.neo4j.cypher.EntityNotFoundException` error referencing Node with ID 429, which is a node created by session **1**. \r\n\r\nThis appears to be the same issue as http://stackoverflow.com/questions/26133131/are-neo4js-cypher-transactions-broken. The poster said they would open an issue but if they did, I couldn't find it."},"comment":{"url":"https://api.github.com/repos/neo4j/neo4j/issues/comments/71232523","html_url":"https://github.com/neo4j/neo4j/issues/3864#issuecomment-71232523","issue_url":"https://api.github.com/repos/neo4j/neo4j/issues/3864","id":71232523,"user":{"login":"bunkat","id":665885,"avatar_url":"https://avatars.githubusercontent.com/u/665885?v=3","gravatar_id":"","url":"https://api.github.com/users/bunkat","html_url":"https://github.com/bunkat","followers_url":"https://api.github.com/users/bunkat/followers","following_url":"https://api.github.com/users/bunkat/following{/other_user}","gists_url":"https://api.github.com/users/bunkat/gists{/gist_id}","starred_url":"https://api.github.com/users/bunkat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bunkat/subscriptions","organizations_url":"https://api.github.com/users/bunkat/orgs","repos_url":"https://api.github.com/users/bunkat/repos","events_url":"https://api.github.com/users/bunkat/events{/privacy}","received_events_url":"https://api.github.com/users/bunkat/received_events","type":"User","site_admin":false},"created_at":"2015-01-23T17:44:23Z","updated_at":"2015-01-23T17:44:23Z","body":"This is what I've had to do as well.  I retry both `NotFoundException` and `DeadlockDetected` exceptions, waiting longer on each retry in hopes that a window opens up when they will succeed. Even doing this, I still see transactions outright fail when using Cypher over REST without returning any exception."}}