{"action":"created","issue":{"url":"https://api.github.com/repos/neo4j/neo4j/issues/4137","labels_url":"https://api.github.com/repos/neo4j/neo4j/issues/4137/labels{/name}","comments_url":"https://api.github.com/repos/neo4j/neo4j/issues/4137/comments","events_url":"https://api.github.com/repos/neo4j/neo4j/issues/4137/events","html_url":"https://github.com/neo4j/neo4j/issues/4137","id":60218706,"number":4137,"title":"`Neo.DatabaseError.Transaction.CouldNotCommit` after non-fatal errors","user":{"login":"aseemk","id":537838,"avatar_url":"https://avatars.githubusercontent.com/u/537838?v=3","gravatar_id":"","url":"https://api.github.com/users/aseemk","html_url":"https://github.com/aseemk","followers_url":"https://api.github.com/users/aseemk/followers","following_url":"https://api.github.com/users/aseemk/following{/other_user}","gists_url":"https://api.github.com/users/aseemk/gists{/gist_id}","starred_url":"https://api.github.com/users/aseemk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aseemk/subscriptions","organizations_url":"https://api.github.com/users/aseemk/orgs","repos_url":"https://api.github.com/users/aseemk/repos","events_url":"https://api.github.com/users/aseemk/events{/privacy}","received_events_url":"https://api.github.com/users/aseemk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-07T18:40:38Z","updated_at":"2015-10-21T05:48:16Z","closed_at":"2015-10-21T05:48:16Z","body":"Hi guys,\r\n\r\nWe at @FiftyThree have mentioned this to @jhfneo on an internal support ticket, but thought this was worthy of a public discussion. (I'd like to reach out to other driver authors about this.)\r\n\r\nIf you:\r\n\r\n1. Begin a transaction (over the REST API, via the transactional endpoint);\r\n2. Execute a statement successfully;\r\n3. Execute another statement that fails with a `ClientError` or `TransientError`;\r\n4. Execute a third statement ***successfully*** (e.g. a retry in response to the `TransientError`);\r\n5. Then attempt to commit the transaction...\r\n\r\nNeo4j 2.1.x consistently fails with the mentioned `Neo.DatabaseError.Transaction.CouldNotCommit`, whereas I would expect the transaction to commit successfully.\r\n\r\nHere is the full Neo4j stack trace: https://gist.github.com/aseemk/070419175f3d8c0b3c24\r\n\r\n—\r\n\r\nI feel that this is a clear bug for the following reasons:\r\n\r\n- The docs clearly say that transactions are rolled back only on `DatabaseError`s — *not* `ClientErrors` or `TransientErrors`. http://neo4j.com/docs/stable/status-codes.html#_classifications\r\n\r\n- As I emphasized above, the third statement succeeded, so clearly the transaction is still considered open and valid after the second statement's failure.\r\n\r\n- The response of `DatabaseError` suggests this is a bug or oversight in the Neo4j code, *not* an invalid client action (like posting to a rolled back transaction normally is, resulting in a `ClientError` instead).\r\n\r\nI really hope the interpretation isn't that transactions should *always* be rolled back. That would defeat the purpose of having `TransientError`s in particular; there wouldn't be any opportunity to retry then.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/neo4j/neo4j/issues/comments/149790201","html_url":"https://github.com/neo4j/neo4j/issues/4137#issuecomment-149790201","issue_url":"https://api.github.com/repos/neo4j/neo4j/issues/4137","id":149790201,"user":{"login":"aseemk","id":537838,"avatar_url":"https://avatars.githubusercontent.com/u/537838?v=3","gravatar_id":"","url":"https://api.github.com/users/aseemk","html_url":"https://github.com/aseemk","followers_url":"https://api.github.com/users/aseemk/followers","following_url":"https://api.github.com/users/aseemk/following{/other_user}","gists_url":"https://api.github.com/users/aseemk/gists{/gist_id}","starred_url":"https://api.github.com/users/aseemk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aseemk/subscriptions","organizations_url":"https://api.github.com/users/aseemk/orgs","repos_url":"https://api.github.com/users/aseemk/repos","events_url":"https://api.github.com/users/aseemk/events{/privacy}","received_events_url":"https://api.github.com/users/aseemk/received_events","type":"User","site_admin":false},"created_at":"2015-10-21T05:48:16Z","updated_at":"2015-10-21T05:48:16Z","body":"I inadvertently created a dupe of this issue in #5258, but it was fixed there."}}