{"action":"opened","issue":{"url":"https://api.github.com/repos/deephacks/lmdbjni/issues/73","repository_url":"https://api.github.com/repos/deephacks/lmdbjni","labels_url":"https://api.github.com/repos/deephacks/lmdbjni/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/deephacks/lmdbjni/issues/73/comments","events_url":"https://api.github.com/repos/deephacks/lmdbjni/issues/73/events","html_url":"https://github.com/deephacks/lmdbjni/issues/73","id":167030671,"number":73,"title":"Correct handling of MAP_FULL exception","user":{"login":"kk00ss","id":3996178,"avatar_url":"https://avatars.githubusercontent.com/u/3996178?v=3","gravatar_id":"","url":"https://api.github.com/users/kk00ss","html_url":"https://github.com/kk00ss","followers_url":"https://api.github.com/users/kk00ss/followers","following_url":"https://api.github.com/users/kk00ss/following{/other_user}","gists_url":"https://api.github.com/users/kk00ss/gists{/gist_id}","starred_url":"https://api.github.com/users/kk00ss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kk00ss/subscriptions","organizations_url":"https://api.github.com/users/kk00ss/orgs","repos_url":"https://api.github.com/users/kk00ss/repos","events_url":"https://api.github.com/users/kk00ss/events{/privacy}","received_events_url":"https://api.github.com/users/kk00ss/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-22T12:02:20Z","updated_at":"2016-07-22T12:02:20Z","closed_at":null,"body":"I've set initial size to 4Gb, and when I attempt to reopen environment I get exception which for some reason is null, and after restart I see \r\n```Exception in thread \"main\" java.lang.ExceptionInInitializerError\r\n\tat rhinodog.Run.main.main(main.scala)\r\nCaused by: org.fusesource.lmdbjni.LMDBException: MDB_INVALID: File is not an LMDB file```\r\nand cannot reopen LMDB.\r\nI'm blocking all the read threads that are trying to access Environment. \r\n```\r\n        this.environment = new Env()\r\n        logger.debug(\"openEnvironment mapSize = {}\", newSize)\r\n        environment.setMapSize(newSize)\r\n        environment.setMaxDbs(numberOfDatabases)\r\n        //TODO: VERIFY ASSUMPTION - Constants.NORDAHEAD hurts single threaded performance\r\n        //TODO: - improves multithreaded theoretically\r\n        val flag = if (this.storageMode == storageModeEnum.READ_ONLY) Constants.RDONLY else 0\r\n        environment.open(newDir.getPath, flag) // EXCEPTION == NULL IS THROWN HERE\r\n        this.postingsDB = environment.openDatabase(\"postings\")\r\n        this.metadataDB = environment.openDatabase(\"metadata\")\r\n        this.documentsDB = environment.openDatabase(\"documents\")\r\n        this.numberOfDeletedDB = environment.openDatabase(\"numberOfDeletedByBlock\")\r\n        this.roaringBitmapsDB = environment.openDatabase(\"roaringBitmaps\")\r\n        this.term2ID_DB = environment.openDatabase(\"term2ID_DB\")\r\n        this.ID2Term_DB = environment.openDatabase(\"ID2Term_DB\")\r\n```"}}
{"actor":{"display_login":"kk00ss"}}