{"action":"opened","issue":{"url":"https://api.github.com/repos/boltdb/bolt/issues/429","labels_url":"https://api.github.com/repos/boltdb/bolt/issues/429/labels{/name}","comments_url":"https://api.github.com/repos/boltdb/bolt/issues/429/comments","events_url":"https://api.github.com/repos/boltdb/bolt/issues/429/events","html_url":"https://github.com/boltdb/bolt/issues/429","id":108250466,"number":429,"title":"Boltdb Deleting Bucket?","user":{"login":"DavidVorick","id":2316841,"avatar_url":"https://avatars.githubusercontent.com/u/2316841?v=3","gravatar_id":"","url":"https://api.github.com/users/DavidVorick","html_url":"https://github.com/DavidVorick","followers_url":"https://api.github.com/users/DavidVorick/followers","following_url":"https://api.github.com/users/DavidVorick/following{/other_user}","gists_url":"https://api.github.com/users/DavidVorick/gists{/gist_id}","starred_url":"https://api.github.com/users/DavidVorick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DavidVorick/subscriptions","organizations_url":"https://api.github.com/users/DavidVorick/orgs","repos_url":"https://api.github.com/users/DavidVorick/repos","events_url":"https://api.github.com/users/DavidVorick/events{/privacy}","received_events_url":"https://api.github.com/users/DavidVorick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-25T02:26:53Z","updated_at":"2015-09-25T02:26:53Z","closed_at":null,"body":"I've started poking around in the bolt codebase, but it seems like, nondeterministically, though after a significant amount of changes within a single tx, calling `Delete` on a bucket can result in the entire bucket being deleted.\r\n\r\nThings I know about my code:\r\n\r\n1. A _lot_ is happening in a single tx. Probably on the order of thousands of reads and writes to the bucket.\r\n2. The change that is causing the bucket to be emptied is not happening inside of a ForEach statement or a cursor.\r\n3. The bucket seems most likely to wipe when there are only a few elements remaining.\r\n\r\n```\r\n    lenScoBucket(tx) // prints 3\r\n    err := scoBucket.Delete(id[:]) // err is nil\r\n    lenScoBucket(tx) // prints 0\r\n```\r\n\r\nMy whole codebase is pretty complicated. It's completely possible that I'm doing something else incorrect somewhere but the error isn't showing up until this point. I will be digging through the bolt code, but was hoping someone had ideas."}}