{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/rocksdb/issues/1080","repository_url":"https://api.github.com/repos/facebook/rocksdb","labels_url":"https://api.github.com/repos/facebook/rocksdb/issues/1080/labels{/name}","comments_url":"https://api.github.com/repos/facebook/rocksdb/issues/1080/comments","events_url":"https://api.github.com/repos/facebook/rocksdb/issues/1080/events","html_url":"https://github.com/facebook/rocksdb/issues/1080","id":148653519,"number":1080,"title":"JNI RocksDB.close() async?","user":{"login":"sam-guo","id":18289348,"avatar_url":"https://avatars.githubusercontent.com/u/18289348?v=3","gravatar_id":"","url":"https://api.github.com/users/sam-guo","html_url":"https://github.com/sam-guo","followers_url":"https://api.github.com/users/sam-guo/followers","following_url":"https://api.github.com/users/sam-guo/following{/other_user}","gists_url":"https://api.github.com/users/sam-guo/gists{/gist_id}","starred_url":"https://api.github.com/users/sam-guo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sam-guo/subscriptions","organizations_url":"https://api.github.com/users/sam-guo/orgs","repos_url":"https://api.github.com/users/sam-guo/repos","events_url":"https://api.github.com/users/sam-guo/events{/privacy}","received_events_url":"https://api.github.com/users/sam-guo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/rocksdb/labels/java-api","name":"java-api","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"adamretter","id":1264057,"avatar_url":"https://avatars.githubusercontent.com/u/1264057?v=3","gravatar_id":"","url":"https://api.github.com/users/adamretter","html_url":"https://github.com/adamretter","followers_url":"https://api.github.com/users/adamretter/followers","following_url":"https://api.github.com/users/adamretter/following{/other_user}","gists_url":"https://api.github.com/users/adamretter/gists{/gist_id}","starred_url":"https://api.github.com/users/adamretter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamretter/subscriptions","organizations_url":"https://api.github.com/users/adamretter/orgs","repos_url":"https://api.github.com/users/adamretter/repos","events_url":"https://api.github.com/users/adamretter/events{/privacy}","received_events_url":"https://api.github.com/users/adamretter/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2016-04-15T12:56:32Z","updated_at":"2016-04-21T17:46:03Z","closed_at":null,"body":"Hi,\r\n\r\nIn my junit test case, I repeatedly write to rocks db, close it (by closing all rocks resource I can think of, then RocksDB.close() ), delete the db, and start over again. At random time I would get this error:\r\n\r\nAssertion failed: (refs_.load(std::memory_order_relaxed) == 0), function ~ColumnFamilyData, file db/column_family.cc, line 412.\r\n\r\nThis error appears on random time of the test, always after the delete db. I suspect the RocksDB.close() is not completed yet in the background when the db is deleted in disk. Is this possible?\r\n\r\nIn my test I use only default column family, so there is no need to close the column family explicitly. Is this correct?\r\n\r\nThanks,\r\nSam"},"comment":{"url":"https://api.github.com/repos/facebook/rocksdb/issues/comments/213034506","html_url":"https://github.com/facebook/rocksdb/issues/1080#issuecomment-213034506","issue_url":"https://api.github.com/repos/facebook/rocksdb/issues/1080","id":213034506,"user":{"login":"sam-guo","id":18289348,"avatar_url":"https://avatars.githubusercontent.com/u/18289348?v=3","gravatar_id":"","url":"https://api.github.com/users/sam-guo","html_url":"https://github.com/sam-guo","followers_url":"https://api.github.com/users/sam-guo/followers","following_url":"https://api.github.com/users/sam-guo/following{/other_user}","gists_url":"https://api.github.com/users/sam-guo/gists{/gist_id}","starred_url":"https://api.github.com/users/sam-guo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sam-guo/subscriptions","organizations_url":"https://api.github.com/users/sam-guo/orgs","repos_url":"https://api.github.com/users/sam-guo/repos","events_url":"https://api.github.com/users/sam-guo/events{/privacy}","received_events_url":"https://api.github.com/users/sam-guo/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T17:46:03Z","updated_at":"2016-04-21T17:46:03Z","body":"There is another piece of related info.\r\n\r\nWith \r\n   RocksDB open(Options var0, String var1)\r\nwhen ever I use Intellij debugger to step into a class that directly uses RocksIterator, the debugger session dies immediately. Without stepping into those classes the program runs fine, with and without debugger running.\r\n\r\nWith \r\n   open(DBOptions var0, String var1, List var2, List var3)\r\nabove problem never occurred.\r\n\r\nHave no idea why, just observation.\r\n"}}