{"action":"created","issue":{"url":"https://api.github.com/repos/jankotek/mapdb/issues/566","labels_url":"https://api.github.com/repos/jankotek/mapdb/issues/566/labels{/name}","comments_url":"https://api.github.com/repos/jankotek/mapdb/issues/566/comments","events_url":"https://api.github.com/repos/jankotek/mapdb/issues/566/events","html_url":"https://github.com/jankotek/mapdb/issues/566","id":103669076,"number":566,"title":"ERROR: Caused by java.io.IOException: Zero Header, data corrupted","user":{"login":"uwittygit","id":11749410,"avatar_url":"https://avatars.githubusercontent.com/u/11749410?v=3","gravatar_id":"","url":"https://api.github.com/users/uwittygit","html_url":"https://github.com/uwittygit","followers_url":"https://api.github.com/users/uwittygit/followers","following_url":"https://api.github.com/users/uwittygit/following{/other_user}","gists_url":"https://api.github.com/users/uwittygit/gists{/gist_id}","starred_url":"https://api.github.com/users/uwittygit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwittygit/subscriptions","organizations_url":"https://api.github.com/users/uwittygit/orgs","repos_url":"https://api.github.com/users/uwittygit/repos","events_url":"https://api.github.com/users/uwittygit/events{/privacy}","received_events_url":"https://api.github.com/users/uwittygit/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-28T08:21:45Z","updated_at":"2015-09-30T09:29:12Z","closed_at":"2015-09-30T09:29:12Z","body":"Hi, \r\nVersion: mapdb-2.0.0-SNAPSHOT.jar, built from latest master branch.\r\nubuntu14.04 64bit, java8\r\n\r\nI met with a bug: \r\nI was building a huge HtreeMap, and then commit it to the disk,  the bug happens when I try to get the HtreeMap size after HTreeMap was commited.\r\n\"ERROR: Caused by java.io.IOException: Zero Header, data corrupted\"\r\n\r\nbesides, if the HTreeMap was smaller, the bug will not happen !!!!!!\r\nMy test is: generated mapDB file  2.5G is ok, 4.6G bug happened.\r\n\r\n/* ================ code =====================*/\r\nMain Thread:\r\ndb = DBMaker.fileDB(new File(mapdbPath))\r\n                .cacheSize(cacheSize)\r\n                .cacheLRUEnable()\r\n                .cacheHashTableEnable()\r\n                .make();\r\n        sentenceIndexer = db.hashMap(\"sentenceIndexer\");\r\n        sentenceIndexer.clear();\r\n\r\n///  build sentenceIndexer in another single building thread\r\n//// wait for the building thread end job\r\n/// commit to file\r\n        System.out.println(\"binarizing to file \" + mapdbPath + \"...\");\r\n        db.commit();\r\n        System.out.printf(\"Done!! total sentences:%d\\n\", sentenceIndexer.size()); ////// bug happens here\r\n/* ================ code end ==================*/\r\n\r\n\r\nbacktrace:\r\nERROR: Caused by java.io.IOException: Zero Header, data corrupted:\r\norg.mapdb.SerializerBase$19.deserialize(SerializerBase.java:432)\r\norg.mapdb.SerializerBase.deserialize(SerializerBase.java:1427)\r\norg.mapdb.SerializerBase.deserialize(SerializerBase.java:1415)\r\norg.mapdb.HTreeMap$1.deserialize(HTreeMap.java:158)\r\norg.mapdb.HTreeMap$1.deserialize(HTreeMap.java:132)\r\norg.mapdb.Store.deserialize(Store.java:415)\r\norg.mapdb.StoreWAL.get2(StoreWAL.java:705)\r\norg.mapdb.Store.get(Store.java:253)\r\norg.mapdb.HTreeMap.recursiveDirCount(HTreeMap.java:530)\r\norg.mapdb.HTreeMap.recursiveDirCount(HTreeMap.java:525)\r\norg.mapdb.HTreeMap.recursiveDirCount(HTreeMap.java:525)\r\norg.mapdb.HTreeMap.sizeLong(HTreeMap.java:501)\r\norg.mapdb.HTreeMap.size(HTreeMap.java:472)\r\ncn.smartnlp.semantic.TightSemantics.makeSemantics(TightSemantics.java:342)\r\ncn.smartnlp.semantic.TightSemanticsMaker.run(TightSemanticsMaker.java:55)\r\nfig.exec.Execution.runWithObjArray(Unknown Source)\r\nfig.exec.Execution.run(Unknown Source)\r\ncn.smartnlp.semantic.TightSemanticsMaker.main(TightSemanticsMaker.java:44)\r\n2 errors, 0 warnings\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/jankotek/mapdb/issues/comments/144337732","html_url":"https://github.com/jankotek/mapdb/issues/566#issuecomment-144337732","issue_url":"https://api.github.com/repos/jankotek/mapdb/issues/566","id":144337732,"user":{"login":"jankotek","id":359021,"avatar_url":"https://avatars.githubusercontent.com/u/359021?v=3","gravatar_id":"","url":"https://api.github.com/users/jankotek","html_url":"https://github.com/jankotek","followers_url":"https://api.github.com/users/jankotek/followers","following_url":"https://api.github.com/users/jankotek/following{/other_user}","gists_url":"https://api.github.com/users/jankotek/gists{/gist_id}","starred_url":"https://api.github.com/users/jankotek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jankotek/subscriptions","organizations_url":"https://api.github.com/users/jankotek/orgs","repos_url":"https://api.github.com/users/jankotek/repos","events_url":"https://api.github.com/users/jankotek/events{/privacy}","received_events_url":"https://api.github.com/users/jankotek/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T09:29:12Z","updated_at":"2015-09-30T09:29:12Z","body":"There was issue with random data corruption. I believe it is fixed in 2.0-beta8"}}