{"action":"created","comment":{"url":"https://api.github.com/repos/src-d/engine/pulls/comments/166661507","pull_request_review_id":94760674,"id":166661507,"diff_hunk":"@@ -8,12 +8,18 @@ import tech.sourced.engine.provider.{RepositoryProvider, RepositorySource, Repos\n import tech.sourced.engine.{BaseSivaSpec, BaseSparkSpec}\n \n trait BaseChainableIterator extends Suite with BaseSparkSpec with BaseSivaSpec with Matchers {\n+  override def afterAll(): Unit = {\n+    super.afterAll()\n+    provider.close(source, repo)\n+  }\n+\n   lazy val prov: RepositoryRDDProvider = RepositoryRDDProvider(ss.sparkContext)\n   lazy val rdd: RDD[RepositorySource] = prov.get(resourcePath, RepositoryRDDProvider.SivaFormat)\n \n   lazy val source: RepositorySource = rdd.filter(source => source.pds.getPath()\n     .endsWith(\"fff7062de8474d10a67d417ccea87ba6f58ca81d.siva\")).first()\n-  lazy val repo: Repository = RepositoryProvider(\"/tmp\").get(source)\n+  lazy val provider: RepositoryProvider = RepositoryProvider(\"/tmp\")","path":"src/test/scala/tech/sourced/engine/iterator/BaseChainableIterator.scala","position":15,"original_position":15,"commit_id":"5b0fb4ebf18f953d405e065842abed270014a832","original_commit_id":"5b0fb4ebf18f953d405e065842abed270014a832","user":{"login":"ajnavarro","id":1196465,"avatar_url":"https://avatars3.githubusercontent.com/u/1196465?v=4","gravatar_id":"","url":"https://api.github.com/users/ajnavarro","html_url":"https://github.com/ajnavarro","followers_url":"https://api.github.com/users/ajnavarro/followers","following_url":"https://api.github.com/users/ajnavarro/following{/other_user}","gists_url":"https://api.github.com/users/ajnavarro/gists{/gist_id}","starred_url":"https://api.github.com/users/ajnavarro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajnavarro/subscriptions","organizations_url":"https://api.github.com/users/ajnavarro/orgs","repos_url":"https://api.github.com/users/ajnavarro/repos","events_url":"https://api.github.com/users/ajnavarro/events{/privacy}","received_events_url":"https://api.github.com/users/ajnavarro/received_events","type":"User","site_admin":false},"body":"That change I think does make sense. You are not closing using the provider.","created_at":"2018-02-07T15:54:36Z","updated_at":"2018-02-07T15:55:56Z","html_url":"https://github.com/src-d/engine/pull/326#discussion_r166661507","pull_request_url":"https://api.github.com/repos/src-d/engine/pulls/326","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/src-d/engine/pulls/comments/166661507"},"html":{"href":"https://github.com/src-d/engine/pull/326#discussion_r166661507"},"pull_request":{"href":"https://api.github.com/repos/src-d/engine/pulls/326"}}},"pull_request":{"url":"https://api.github.com/repos/src-d/engine/pulls/326","id":166233908,"html_url":"https://github.com/src-d/engine/pull/326","diff_url":"https://github.com/src-d/engine/pull/326.diff","patch_url":"https://github.com/src-d/engine/pull/326.patch","issue_url":"https://api.github.com/repos/src-d/engine/issues/326","number":326,"state":"open","locked":false,"title":"Limit the number of repositories kept in the pool","user":{"login":"jfontan","id":1829,"avatar_url":"https://avatars2.githubusercontent.com/u/1829?v=4","gravatar_id":"","url":"https://api.github.com/users/jfontan","html_url":"https://github.com/jfontan","followers_url":"https://api.github.com/users/jfontan/followers","following_url":"https://api.github.com/users/jfontan/following{/other_user}","gists_url":"https://api.github.com/users/jfontan/gists{/gist_id}","starred_url":"https://api.github.com/users/jfontan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfontan/subscriptions","organizations_url":"https://api.github.com/users/jfontan/orgs","repos_url":"https://api.github.com/users/jfontan/repos","events_url":"https://api.github.com/users/jfontan/events{/privacy}","received_events_url":"https://api.github.com/users/jfontan/received_events","type":"User","site_admin":false},"body":"The limit is set to the double of the number of parallelism. Without thischange there could be OutOfMemory problems when processing big repos.\r\n\r\nFixes #319 ","created_at":"2018-01-31T11:29:41Z","updated_at":"2018-02-07T15:55:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"92eeb14d9f9124bdb9214d019b4400146bec7bc2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/src-d/engine/pulls/326/commits","review_comments_url":"https://api.github.com/repos/src-d/engine/pulls/326/comments","review_comment_url":"https://api.github.com/repos/src-d/engine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/src-d/engine/issues/326/comments","statuses_url":"https://api.github.com/repos/src-d/engine/statuses/5b0fb4ebf18f953d405e065842abed270014a832","head":{"label":"jfontan:fix/limit-repository-pool","ref":"fix/limit-repository-pool","sha":"5b0fb4ebf18f953d405e065842abed270014a832","user":{"login":"jfontan","id":1829,"avatar_url":"https://avatars2.githubusercontent.com/u/1829?v=4","gravatar_id":"","url":"https://api.github.com/users/jfontan","html_url":"https://github.com/jfontan","followers_url":"https://api.github.com/users/jfontan/followers","following_url":"https://api.github.com/users/jfontan/following{/other_user}","gists_url":"https://api.github.com/users/jfontan/gists{/gist_id}","starred_url":"https://api.github.com/users/jfontan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfontan/subscriptions","organizations_url":"https://api.github.com/users/jfontan/orgs","repos_url":"https://api.github.com/users/jfontan/repos","events_url":"https://api.github.com/users/jfontan/events{/privacy}","received_events_url":"https://api.github.com/users/jfontan/received_events","type":"User","site_admin":false},"repo":{"id":109689369,"name":"engine","full_name":"jfontan/engine","owner":{"login":"jfontan","id":1829,"avatar_url":"https://avatars2.githubusercontent.com/u/1829?v=4","gravatar_id":"","url":"https://api.github.com/users/jfontan","html_url":"https://github.com/jfontan","followers_url":"https://api.github.com/users/jfontan/followers","following_url":"https://api.github.com/users/jfontan/following{/other_user}","gists_url":"https://api.github.com/users/jfontan/gists{/gist_id}","starred_url":"https://api.github.com/users/jfontan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfontan/subscriptions","organizations_url":"https://api.github.com/users/jfontan/orgs","repos_url":"https://api.github.com/users/jfontan/repos","events_url":"https://api.github.com/users/jfontan/events{/privacy}","received_events_url":"https://api.github.com/users/jfontan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jfontan/engine","description":"source{d} Engine is a library for running scalable data retrieval pipelines that process any number of Git repositories for source code analysis.","fork":true,"url":"https://api.github.com/repos/jfontan/engine","forks_url":"https://api.github.com/repos/jfontan/engine/forks","keys_url":"https://api.github.com/repos/jfontan/engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jfontan/engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jfontan/engine/teams","hooks_url":"https://api.github.com/repos/jfontan/engine/hooks","issue_events_url":"https://api.github.com/repos/jfontan/engine/issues/events{/number}","events_url":"https://api.github.com/repos/jfontan/engine/events","assignees_url":"https://api.github.com/repos/jfontan/engine/assignees{/user}","branches_url":"https://api.github.com/repos/jfontan/engine/branches{/branch}","tags_url":"https://api.github.com/repos/jfontan/engine/tags","blobs_url":"https://api.github.com/repos/jfontan/engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jfontan/engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jfontan/engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/jfontan/engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jfontan/engine/statuses/{sha}","languages_url":"https://api.github.com/repos/jfontan/engine/languages","stargazers_url":"https://api.github.com/repos/jfontan/engine/stargazers","contributors_url":"https://api.github.com/repos/jfontan/engine/contributors","subscribers_url":"https://api.github.com/repos/jfontan/engine/subscribers","subscription_url":"https://api.github.com/repos/jfontan/engine/subscription","commits_url":"https://api.github.com/repos/jfontan/engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/jfontan/engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/jfontan/engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/jfontan/engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/jfontan/engine/contents/{+path}","compare_url":"https://api.github.com/repos/jfontan/engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jfontan/engine/merges","archive_url":"https://api.github.com/repos/jfontan/engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jfontan/engine/downloads","issues_url":"https://api.github.com/repos/jfontan/engine/issues{/number}","pulls_url":"https://api.github.com/repos/jfontan/engine/pulls{/number}","milestones_url":"https://api.github.com/repos/jfontan/engine/milestones{/number}","notifications_url":"https://api.github.com/repos/jfontan/engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jfontan/engine/labels{/name}","releases_url":"https://api.github.com/repos/jfontan/engine/releases{/id}","deployments_url":"https://api.github.com/repos/jfontan/engine/deployments","created_at":"2017-11-06T11:57:08Z","updated_at":"2017-11-06T11:57:10Z","pushed_at":"2018-02-07T15:49:57Z","git_url":"git://github.com/jfontan/engine.git","ssh_url":"git@github.com:jfontan/engine.git","clone_url":"https://github.com/jfontan/engine.git","svn_url":"https://github.com/jfontan/engine","homepage":"","size":7288,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"src-d:master","ref":"master","sha":"fb0a95eab6ff049f43f93073d2bf374e1e463d05","user":{"login":"src-d","id":15128793,"avatar_url":"https://avatars2.githubusercontent.com/u/15128793?v=4","gravatar_id":"","url":"https://api.github.com/users/src-d","html_url":"https://github.com/src-d","followers_url":"https://api.github.com/users/src-d/followers","following_url":"https://api.github.com/users/src-d/following{/other_user}","gists_url":"https://api.github.com/users/src-d/gists{/gist_id}","starred_url":"https://api.github.com/users/src-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/src-d/subscriptions","organizations_url":"https://api.github.com/users/src-d/orgs","repos_url":"https://api.github.com/users/src-d/repos","events_url":"https://api.github.com/users/src-d/events{/privacy}","received_events_url":"https://api.github.com/users/src-d/received_events","type":"Organization","site_admin":false},"repo":{"id":99223053,"name":"engine","full_name":"src-d/engine","owner":{"login":"src-d","id":15128793,"avatar_url":"https://avatars2.githubusercontent.com/u/15128793?v=4","gravatar_id":"","url":"https://api.github.com/users/src-d","html_url":"https://github.com/src-d","followers_url":"https://api.github.com/users/src-d/followers","following_url":"https://api.github.com/users/src-d/following{/other_user}","gists_url":"https://api.github.com/users/src-d/gists{/gist_id}","starred_url":"https://api.github.com/users/src-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/src-d/subscriptions","organizations_url":"https://api.github.com/users/src-d/orgs","repos_url":"https://api.github.com/users/src-d/repos","events_url":"https://api.github.com/users/src-d/events{/privacy}","received_events_url":"https://api.github.com/users/src-d/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/src-d/engine","description":"engine is a library for running scalable data retrieval pipelines that process any number of Git repositories for source code analysis.","fork":false,"url":"https://api.github.com/repos/src-d/engine","forks_url":"https://api.github.com/repos/src-d/engine/forks","keys_url":"https://api.github.com/repos/src-d/engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/src-d/engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/src-d/engine/teams","hooks_url":"https://api.github.com/repos/src-d/engine/hooks","issue_events_url":"https://api.github.com/repos/src-d/engine/issues/events{/number}","events_url":"https://api.github.com/repos/src-d/engine/events","assignees_url":"https://api.github.com/repos/src-d/engine/assignees{/user}","branches_url":"https://api.github.com/repos/src-d/engine/branches{/branch}","tags_url":"https://api.github.com/repos/src-d/engine/tags","blobs_url":"https://api.github.com/repos/src-d/engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/src-d/engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/src-d/engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/src-d/engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/src-d/engine/statuses/{sha}","languages_url":"https://api.github.com/repos/src-d/engine/languages","stargazers_url":"https://api.github.com/repos/src-d/engine/stargazers","contributors_url":"https://api.github.com/repos/src-d/engine/contributors","subscribers_url":"https://api.github.com/repos/src-d/engine/subscribers","subscription_url":"https://api.github.com/repos/src-d/engine/subscription","commits_url":"https://api.github.com/repos/src-d/engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/src-d/engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/src-d/engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/src-d/engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/src-d/engine/contents/{+path}","compare_url":"https://api.github.com/repos/src-d/engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/src-d/engine/merges","archive_url":"https://api.github.com/repos/src-d/engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/src-d/engine/downloads","issues_url":"https://api.github.com/repos/src-d/engine/issues{/number}","pulls_url":"https://api.github.com/repos/src-d/engine/pulls{/number}","milestones_url":"https://api.github.com/repos/src-d/engine/milestones{/number}","notifications_url":"https://api.github.com/repos/src-d/engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/src-d/engine/labels{/name}","releases_url":"https://api.github.com/repos/src-d/engine/releases{/id}","deployments_url":"https://api.github.com/repos/src-d/engine/deployments","created_at":"2017-08-03T10:55:44Z","updated_at":"2018-02-06T12:47:15Z","pushed_at":"2018-02-07T15:49:58Z","git_url":"git://github.com/src-d/engine.git","ssh_url":"git@github.com:src-d/engine.git","clone_url":"https://github.com/src-d/engine.git","svn_url":"https://github.com/src-d/engine","homepage":"https://engine.sourced.tech/","size":7268,"stargazers_count":33,"watchers_count":33,"language":"Scala","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":22,"open_issues":16,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/src-d/engine/pulls/326"},"html":{"href":"https://github.com/src-d/engine/pull/326"},"issue":{"href":"https://api.github.com/repos/src-d/engine/issues/326"},"comments":{"href":"https://api.github.com/repos/src-d/engine/issues/326/comments"},"review_comments":{"href":"https://api.github.com/repos/src-d/engine/pulls/326/comments"},"review_comment":{"href":"https://api.github.com/repos/src-d/engine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/src-d/engine/pulls/326/commits"},"statuses":{"href":"https://api.github.com/repos/src-d/engine/statuses/5b0fb4ebf18f953d405e065842abed270014a832"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ajnavarro"}}