{"action":"opened","issue":{"url":"https://api.github.com/repos/boltdb/bolt/issues/382","labels_url":"https://api.github.com/repos/boltdb/bolt/issues/382/labels{/name}","comments_url":"https://api.github.com/repos/boltdb/bolt/issues/382/comments","events_url":"https://api.github.com/repos/boltdb/bolt/issues/382/events","html_url":"https://github.com/boltdb/bolt/issues/382","id":82420204,"number":382,"title":"Failed commit does not always rollback transaction","user":{"login":"rgeronimi","id":3017338,"avatar_url":"https://avatars.githubusercontent.com/u/3017338?v=3","gravatar_id":"","url":"https://api.github.com/users/rgeronimi","html_url":"https://github.com/rgeronimi","followers_url":"https://api.github.com/users/rgeronimi/followers","following_url":"https://api.github.com/users/rgeronimi/following{/other_user}","gists_url":"https://api.github.com/users/rgeronimi/gists{/gist_id}","starred_url":"https://api.github.com/users/rgeronimi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgeronimi/subscriptions","organizations_url":"https://api.github.com/users/rgeronimi/orgs","repos_url":"https://api.github.com/users/rgeronimi/repos","events_url":"https://api.github.com/users/rgeronimi/events{/privacy}","received_events_url":"https://api.github.com/users/rgeronimi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-29T13:06:48Z","updated_at":"2015-05-29T13:06:48Z","closed_at":null,"body":"When managing manually a transaction, there is at least one case where a tx failed commit (error during commit) does not rollback the transaction automatically: if the transaction is not writable.\r\n\r\nIn many other cases, the transaction is rolled back automatically, e.g.: if a page could not be allocated/written to the free list, or if dirty pages could not be written to disk.\r\n\r\nThis inconsistency makes the usage of tx.Commit() unclear for API client: should they always or never take care of calling Rollback() themselves when the Commit() fails? This may be clarified in the doc and/or made more consistent in the code."}}