{"action":"created","issue":{"url":"https://api.github.com/repos/molgenis/molgenis/issues/3499","repository_url":"https://api.github.com/repos/molgenis/molgenis","labels_url":"https://api.github.com/repos/molgenis/molgenis/issues/3499/labels{/name}","comments_url":"https://api.github.com/repos/molgenis/molgenis/issues/3499/comments","events_url":"https://api.github.com/repos/molgenis/molgenis/issues/3499/events","html_url":"https://github.com/molgenis/molgenis/issues/3499","id":102154355,"number":3499,"title":"Repository iterators leak resources until the repository is closed.","user":{"login":"fdlk","id":1523838,"avatar_url":"https://avatars.githubusercontent.com/u/1523838?v=3","gravatar_id":"","url":"https://api.github.com/users/fdlk","html_url":"https://github.com/fdlk","followers_url":"https://api.github.com/users/fdlk/followers","following_url":"https://api.github.com/users/fdlk/following{/other_user}","gists_url":"https://api.github.com/users/fdlk/gists{/gist_id}","starred_url":"https://api.github.com/users/fdlk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdlk/subscriptions","organizations_url":"https://api.github.com/users/fdlk/orgs","repos_url":"https://api.github.com/users/fdlk/repos","events_url":"https://api.github.com/users/fdlk/events{/privacy}","received_events_url":"https://api.github.com/users/fdlk/received_events","type":"User","site_admin":false},"labels":[{"id":27272396,"url":"https://api.github.com/repos/molgenis/molgenis/labels/bug","name":"bug","color":"fc2929","default":true},{"id":89733748,"url":"https://api.github.com/repos/molgenis/molgenis/labels/mod:data","name":"mod:data","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2015-08-20T14:39:15Z","updated_at":"2016-11-18T12:44:36Z","closed_at":null,"body":"When retrieving Entities from a `Repository`, we usually call the `iterator` or `query` methods which return an `Iterator<Entity>`.\n\nIf the Repository is backed by a file, it'll usually create some kind of input stream that needs to be closed when the iterator is done.\nThere is no general way for the Repository to tell that the iterator is no longer being used. It can detect when the last element gets read, but perhaps the client is only interested in the first couple Entities.\nThere is no way for the client to notify the Repository that it's done reading from the iterator.\n\nAs a result, the TabixVcfRepository leaves all the VcfReaders it creates (one per annotated row if it is being used as an annotation resource) open until the repository itself is closed. Which is way too late.\n"},"comment":{"url":"https://api.github.com/repos/molgenis/molgenis/issues/comments/261523642","html_url":"https://github.com/molgenis/molgenis/issues/3499#issuecomment-261523642","issue_url":"https://api.github.com/repos/molgenis/molgenis/issues/3499","id":261523642,"user":{"login":"dennishendriksen","id":2477186,"avatar_url":"https://avatars.githubusercontent.com/u/2477186?v=3","gravatar_id":"","url":"https://api.github.com/users/dennishendriksen","html_url":"https://github.com/dennishendriksen","followers_url":"https://api.github.com/users/dennishendriksen/followers","following_url":"https://api.github.com/users/dennishendriksen/following{/other_user}","gists_url":"https://api.github.com/users/dennishendriksen/gists{/gist_id}","starred_url":"https://api.github.com/users/dennishendriksen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dennishendriksen/subscriptions","organizations_url":"https://api.github.com/users/dennishendriksen/orgs","repos_url":"https://api.github.com/users/dennishendriksen/repos","events_url":"https://api.github.com/users/dennishendriksen/events{/privacy}","received_events_url":"https://api.github.com/users/dennishendriksen/received_events","type":"User","site_admin":false},"created_at":"2016-11-18T12:44:36Z","updated_at":"2016-11-18T12:44:36Z","body":"Relevant https://github.com/molgenis/molgenis/issues/5154"}}
{"actor":{"display_login":"dennishendriksen"}}