GitHub PullRequestReviewCommentEvent at 2014-07-29 06:18:11
Repository: akka
Actor: 13h3r
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/akka/akka/pulls/comments/15507529","id":15507529,"diff_hunk":"@@ -0,0 +1,50 @@\n+/**\n+ * Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com>\n+ */\n+package akka.stream.impl\n+\n+import akka.stream.MaterializerSettings\n+import akka.stream.impl.MultiStreamInputProcessor.SubstreamKey\n+import org.reactivestreams.api.Producer\n+\n+/**\n+ * INTERNAL API\n+ */\n+private[akka] class MergeAllImpl(_settings: MaterializerSettings, maxSimultaneousInputs: Int)\n+  extends MultiStreamInputProcessor(_settings) {\n+  var inputs = List[SubstreamInputs]()\n+\n+  object InputReady extends TransferState {\n+    override def isReady = primaryInputs.inputsAvailable &&\n+      inputs.filterNot(_.inputsDepleted).size < maxSimultaneousInputs\n+    override def isCompleted = primaryInputs.inputsDepleted\n+  }\n+  object SubstreamsReady extends TransferState {\n+    override def isReady = inputs.exists(_.inputsAvailable)\n+    override def isCompleted = !inputs.exists(!_.inputsDepleted)\n+  }\n+\n+  val running: TransferPhase = TransferPhase(\n+    primaryOutputs.NeedsDemand && (InputReady || SubstreamsReady)) { () ⇒\n+      while (InputReady.isExecutable) {\n+        fetchNewInputSubstream()\n+      }\n+      if (SubstreamsReady.isExecutable) {\n+        inputs.find(_.inputsAvailable) foreach { input ⇒","path":"akka-stream/src/main/scala/akka/stream/impl/MergeAllImpl.scala","position":33,"original_position":33,"commit_id":"8a9a694ab1fe5541b25cd69789df80103be12d13","original_commit_id":"8a9a694ab1fe5541b25cd69789df80103be12d13","user":{"login":"13h3r","id":435085,"avatar_url":"https://avatars.githubusercontent.com/u/435085?","gravatar_id":"3d1cc73504882ff69183388ea606bfd1","url":"https://api.github.com/users/13h3r","html_url":"https://github.com/13h3r","followers_url":"https://api.github.com/users/13h3r/followers","following_url":"https://api.github.com/users/13h3r/following{/other_user}","gists_url":"https://api.github.com/users/13h3r/gists{/gist_id}","starred_url":"https://api.github.com/users/13h3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/13h3r/subscriptions","organizations_url":"https://api.github.com/users/13h3r/orgs","repos_url":"https://api.github.com/users/13h3r/repos","events_url":"https://api.github.com/users/13h3r/events{/privacy}","received_events_url":"https://api.github.com/users/13h3r/received_events","type":"User","site_admin":false},"body":"Could you briefly describe \"fair\" merge strategy?","created_at":"2014-07-29T06:18:11Z","updated_at":"2014-07-29T06:18:11Z","html_url":"https://github.com/akka/akka/pull/15570#discussion_r15507529","pull_request_url":"https://api.github.com/repos/akka/akka/pulls/15570","_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/comments/15507529"},"html":{"href":"https://github.com/akka/akka/pull/15570#discussion_r15507529"},"pull_request":{"href":"https://api.github.com/repos/akka/akka/pulls/15570"}}},"pull_request":{"url":"https://api.github.com/repos/akka/akka/pulls/15570","id":18637293,"html_url":"https://github.com/akka/akka/pull/15570","diff_url":"https://github.com/akka/akka/pull/15570.diff","patch_url":"https://github.com/akka/akka/pull/15570.patch","issue_url":"https://api.github.com/repos/akka/akka/issues/15570","number":15570,"state":"open","title":"+str #15089 add flattening for streams: merge","user":{"login":"13h3r","id":435085,"avatar_url":"https://avatars.githubusercontent.com/u/435085?","gravatar_id":"3d1cc73504882ff69183388ea606bfd1","url":"https://api.github.com/users/13h3r","html_url":"https://github.com/13h3r","followers_url":"https://api.github.com/users/13h3r/followers","following_url":"https://api.github.com/users/13h3r/following{/other_user}","gists_url":"https://api.github.com/users/13h3r/gists{/gist_id}","starred_url":"https://api.github.com/users/13h3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/13h3r/subscriptions","organizations_url":"https://api.github.com/users/13h3r/orgs","repos_url":"https://api.github.com/users/13h3r/repos","events_url":"https://api.github.com/users/13h3r/events{/privacy}","received_events_url":"https://api.github.com/users/13h3r/received_events","type":"User","site_admin":false},"body":"I am trying to implement merge concatenation of streams described in #15089. \r\n\r\nThis is my first PL with new functionality, so please point me to general issues need to be corrected.\r\n\r\nWhat is done:\r\n- fetching from first available substream\r\n- simultaneous open substream limitation\r\n\r\nWhat is not done:\r\n- support of merging strategies. Now item fetched from the first available substream. Can be done after #15079\r\n\r\nOpen questions:\r\n- when errors should be propagated?\r\n- MergeAllImpl:19 looks ugly. Any ideas how to simplify this are welcome. ","created_at":"2014-07-21T03:29:42Z","updated_at":"2014-07-29T06:18:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac8210509a28c0428b2cb5e6a77a36b8ac45c413","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/akka/akka/pulls/15570/commits","review_comments_url":"https://api.github.com/repos/akka/akka/pulls/15570/comments","review_comment_url":"https://api.github.com/repos/akka/akka/pulls/comments/{number}","comments_url":"https://api.github.com/repos/akka/akka/issues/15570/comments","statuses_url":"https://api.github.com/repos/akka/akka/statuses/8a9a694ab1fe5541b25cd69789df80103be12d13","head":{"label":"13h3r:wip-15089-flattening-merge-13h3r","ref":"wip-15089-flattening-merge-13h3r","sha":"8a9a694ab1fe5541b25cd69789df80103be12d13","user":{"login":"13h3r","id":435085,"avatar_url":"https://avatars.githubusercontent.com/u/435085?","gravatar_id":"3d1cc73504882ff69183388ea606bfd1","url":"https://api.github.com/users/13h3r","html_url":"https://github.com/13h3r","followers_url":"https://api.github.com/users/13h3r/followers","following_url":"https://api.github.com/users/13h3r/following{/other_user}","gists_url":"https://api.github.com/users/13h3r/gists{/gist_id}","starred_url":"https://api.github.com/users/13h3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/13h3r/subscriptions","organizations_url":"https://api.github.com/users/13h3r/orgs","repos_url":"https://api.github.com/users/13h3r/repos","events_url":"https://api.github.com/users/13h3r/events{/privacy}","received_events_url":"https://api.github.com/users/13h3r/received_events","type":"User","site_admin":false},"repo":{"id":20678963,"name":"akka","full_name":"13h3r/akka","owner":{"login":"13h3r","id":435085,"avatar_url":"https://avatars.githubusercontent.com/u/435085?","gravatar_id":"3d1cc73504882ff69183388ea606bfd1","url":"https://api.github.com/users/13h3r","html_url":"https://github.com/13h3r","followers_url":"https://api.github.com/users/13h3r/followers","following_url":"https://api.github.com/users/13h3r/following{/other_user}","gists_url":"https://api.github.com/users/13h3r/gists{/gist_id}","starred_url":"https://api.github.com/users/13h3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/13h3r/subscriptions","organizations_url":"https://api.github.com/users/13h3r/orgs","repos_url":"https://api.github.com/users/13h3r/repos","events_url":"https://api.github.com/users/13h3r/events{/privacy}","received_events_url":"https://api.github.com/users/13h3r/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/13h3r/akka","description":"Akka Project","fork":true,"url":"https://api.github.com/repos/13h3r/akka","forks_url":"https://api.github.com/repos/13h3r/akka/forks","keys_url":"https://api.github.com/repos/13h3r/akka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/13h3r/akka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/13h3r/akka/teams","hooks_url":"https://api.github.com/repos/13h3r/akka/hooks","issue_events_url":"https://api.github.com/repos/13h3r/akka/issues/events{/number}","events_url":"https://api.github.com/repos/13h3r/akka/events","assignees_url":"https://api.github.com/repos/13h3r/akka/assignees{/user}","branches_url":"https://api.github.com/repos/13h3r/akka/branches{/branch}","tags_url":"https://api.github.com/repos/13h3r/akka/tags","blobs_url":"https://api.github.com/repos/13h3r/akka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/13h3r/akka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/13h3r/akka/git/refs{/sha}","trees_url":"https://api.github.com/repos/13h3r/akka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/13h3r/akka/statuses/{sha}","languages_url":"https://api.github.com/repos/13h3r/akka/languages","stargazers_url":"https://api.github.com/repos/13h3r/akka/stargazers","contributors_url":"https://api.github.com/repos/13h3r/akka/contributors","subscribers_url":"https://api.github.com/repos/13h3r/akka/subscribers","subscription_url":"https://api.github.com/repos/13h3r/akka/subscription","commits_url":"https://api.github.com/repos/13h3r/akka/commits{/sha}","git_commits_url":"https://api.github.com/repos/13h3r/akka/git/commits{/sha}","comments_url":"https://api.github.com/repos/13h3r/akka/comments{/number}","issue_comment_url":"https://api.github.com/repos/13h3r/akka/issues/comments/{number}","contents_url":"https://api.github.com/repos/13h3r/akka/contents/{+path}","compare_url":"https://api.github.com/repos/13h3r/akka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/13h3r/akka/merges","archive_url":"https://api.github.com/repos/13h3r/akka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/13h3r/akka/downloads","issues_url":"https://api.github.com/repos/13h3r/akka/issues{/number}","pulls_url":"https://api.github.com/repos/13h3r/akka/pulls{/number}","milestones_url":"https://api.github.com/repos/13h3r/akka/milestones{/number}","notifications_url":"https://api.github.com/repos/13h3r/akka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/13h3r/akka/labels{/name}","releases_url":"https://api.github.com/repos/13h3r/akka/releases{/id}","created_at":"2014-06-10T09:03:22Z","updated_at":"2014-07-29T03:17:48Z","pushed_at":"2014-07-29T05:07:13Z","git_url":"git://github.com/13h3r/akka.git","ssh_url":"git@github.com:13h3r/akka.git","clone_url":"https://github.com/13h3r/akka.git","svn_url":"https://github.com/13h3r/akka","homepage":"http://akka.io","size":153165,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"release-2.3-dev"}},"base":{"label":"akka:release-2.3-dev","ref":"release-2.3-dev","sha":"82734877d080577cf538c2a47d60c117e078ac1c","user":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?","gravatar_id":"0ff72320fb1bc5db35ba4fae61614eb0","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"repo":{"id":130013,"name":"akka","full_name":"akka/akka","owner":{"login":"akka","id":1496237,"avatar_url":"https://avatars.githubusercontent.com/u/1496237?","gravatar_id":"0ff72320fb1bc5db35ba4fae61614eb0","url":"https://api.github.com/users/akka","html_url":"https://github.com/akka","followers_url":"https://api.github.com/users/akka/followers","following_url":"https://api.github.com/users/akka/following{/other_user}","gists_url":"https://api.github.com/users/akka/gists{/gist_id}","starred_url":"https://api.github.com/users/akka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akka/subscriptions","organizations_url":"https://api.github.com/users/akka/orgs","repos_url":"https://api.github.com/users/akka/repos","events_url":"https://api.github.com/users/akka/events{/privacy}","received_events_url":"https://api.github.com/users/akka/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akka/akka","description":"Akka Project","fork":false,"url":"https://api.github.com/repos/akka/akka","forks_url":"https://api.github.com/repos/akka/akka/forks","keys_url":"https://api.github.com/repos/akka/akka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akka/akka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akka/akka/teams","hooks_url":"https://api.github.com/repos/akka/akka/hooks","issue_events_url":"https://api.github.com/repos/akka/akka/issues/events{/number}","events_url":"https://api.github.com/repos/akka/akka/events","assignees_url":"https://api.github.com/repos/akka/akka/assignees{/user}","branches_url":"https://api.github.com/repos/akka/akka/branches{/branch}","tags_url":"https://api.github.com/repos/akka/akka/tags","blobs_url":"https://api.github.com/repos/akka/akka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akka/akka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akka/akka/git/refs{/sha}","trees_url":"https://api.github.com/repos/akka/akka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akka/akka/statuses/{sha}","languages_url":"https://api.github.com/repos/akka/akka/languages","stargazers_url":"https://api.github.com/repos/akka/akka/stargazers","contributors_url":"https://api.github.com/repos/akka/akka/contributors","subscribers_url":"https://api.github.com/repos/akka/akka/subscribers","subscription_url":"https://api.github.com/repos/akka/akka/subscription","commits_url":"https://api.github.com/repos/akka/akka/commits{/sha}","git_commits_url":"https://api.github.com/repos/akka/akka/git/commits{/sha}","comments_url":"https://api.github.com/repos/akka/akka/comments{/number}","issue_comment_url":"https://api.github.com/repos/akka/akka/issues/comments/{number}","contents_url":"https://api.github.com/repos/akka/akka/contents/{+path}","compare_url":"https://api.github.com/repos/akka/akka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akka/akka/merges","archive_url":"https://api.github.com/repos/akka/akka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akka/akka/downloads","issues_url":"https://api.github.com/repos/akka/akka/issues{/number}","pulls_url":"https://api.github.com/repos/akka/akka/pulls{/number}","milestones_url":"https://api.github.com/repos/akka/akka/milestones{/number}","notifications_url":"https://api.github.com/repos/akka/akka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akka/akka/labels{/name}","releases_url":"https://api.github.com/repos/akka/akka/releases{/id}","created_at":"2009-02-16T12:51:54Z","updated_at":"2014-07-28T23:29:13Z","pushed_at":"2014-07-28T13:16:26Z","git_url":"git://github.com/akka/akka.git","ssh_url":"git@github.com:akka/akka.git","clone_url":"https://github.com/akka/akka.git","svn_url":"https://github.com/akka/akka","homepage":"http://akka.io","size":220086,"stargazers_count":2797,"watchers_count":2797,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":758,"mirror_url":null,"open_issues_count":379,"forks":758,"open_issues":379,"watchers":2797,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akka/akka/pulls/15570"},"html":{"href":"https://github.com/akka/akka/pull/15570"},"issue":{"href":"https://api.github.com/repos/akka/akka/issues/15570"},"comments":{"href":"https://api.github.com/repos/akka/akka/issues/15570/comments"},"review_comments":{"href":"https://api.github.com/repos/akka/akka/pulls/15570/comments"},"review_comment":{"href":"https://api.github.com/repos/akka/akka/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/akka/akka/pulls/15570/commits"},"statuses":{"href":"https://api.github.com/repos/akka/akka/statuses/8a9a694ab1fe5541b25cd69789df80103be12d13"}}}}