GitHub PullRequestReviewCommentEvent at 2014-07-19 06:52:41
Repository: Wake
Actor: bgchun
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft-CISL/Wake/pulls/comments/15142365","id":15142365,"diff_hunk":"@@ -51,7 +51,7 @@\n    * @param transport the transport to send events\n    */\n   public RemoteSenderStage(Encoder encoder, Transport transport) {\n-    this.executor = Executors.newCachedThreadPool(new DefaultThreadFactory(RemoteSenderStage.class.getName()));\n+    this.executor = Executors.newFixedThreadPool(10, new DefaultThreadFactory(RemoteSenderStage.class.getName()));","path":"wake/src/main/java/com/microsoft/wake/remote/impl/RemoteSenderStage.java","position":5,"original_position":5,"commit_id":"e4a14af7656f3cc019d398c6df8408cd18c59b86","original_commit_id":"e4a14af7656f3cc019d398c6df8408cd18c59b86","user":{"login":"bgchun","id":359137,"avatar_url":"https://avatars.githubusercontent.com/u/359137?","gravatar_id":"4f5484022ede76e757b00452c134c1c2","url":"https://api.github.com/users/bgchun","html_url":"https://github.com/bgchun","followers_url":"https://api.github.com/users/bgchun/followers","following_url":"https://api.github.com/users/bgchun/following{/other_user}","gists_url":"https://api.github.com/users/bgchun/gists{/gist_id}","starred_url":"https://api.github.com/users/bgchun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgchun/subscriptions","organizations_url":"https://api.github.com/users/bgchun/orgs","repos_url":"https://api.github.com/users/bgchun/repos","events_url":"https://api.github.com/users/bgchun/events{/privacy}","received_events_url":"https://api.github.com/users/bgchun/received_events","type":"User","site_admin":false},"body":"Make 10 as a parameter.","created_at":"2014-07-19T06:52:41Z","updated_at":"2014-07-19T06:52:41Z","html_url":"https://github.com/Microsoft-CISL/Wake/pull/35#discussion_r15142365","pull_request_url":"https://api.github.com/repos/Microsoft-CISL/Wake/pulls/35","_links":{"self":{"href":"https://api.github.com/repos/Microsoft-CISL/Wake/pulls/comments/15142365"},"html":{"href":"https://github.com/Microsoft-CISL/Wake/pull/35#discussion_r15142365"},"pull_request":{"href":"https://api.github.com/repos/Microsoft-CISL/Wake/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft-CISL/Wake/pulls/35","id":18617536,"html_url":"https://github.com/Microsoft-CISL/Wake/pull/35","diff_url":"https://github.com/Microsoft-CISL/Wake/pull/35.diff","patch_url":"https://github.com/Microsoft-CISL/Wake/pull/35.patch","issue_url":"https://api.github.com/repos/Microsoft-CISL/Wake/issues/35","number":35,"state":"open","title":"Fix several bugs ","user":{"login":"taegeonum","id":1371383,"avatar_url":"https://avatars.githubusercontent.com/u/1371383?","gravatar_id":"6445ef0d22332703d00c1da4c4638bad","url":"https://api.github.com/users/taegeonum","html_url":"https://github.com/taegeonum","followers_url":"https://api.github.com/users/taegeonum/followers","following_url":"https://api.github.com/users/taegeonum/following{/other_user}","gists_url":"https://api.github.com/users/taegeonum/gists{/gist_id}","starred_url":"https://api.github.com/users/taegeonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taegeonum/subscriptions","organizations_url":"https://api.github.com/users/taegeonum/orgs","repos_url":"https://api.github.com/users/taegeonum/repos","events_url":"https://api.github.com/users/taegeonum/events{/privacy}","received_events_url":"https://api.github.com/users/taegeonum/received_events","type":"User","site_admin":false},"body":"This pull request includes the followings: \r\n1. Add injectable constructor to ObjectSerializableCodec - It should be injectable.\r\n2. Change newCachedThreadPool to newFixedThreadPool at RemoteReceiverStage and RemoteSenderStage. - newCachedThreadPool can degrade performance if a bunch of threads are created at the same time. \r\n3. Fix RemoteSenderEventHandler concurrent issue \r\n- There is a scenario which leads to not sending messages completely.\r\n- Let's think two threads enter into RemoteSenderEventHandler onNext() at the same time. \r\n- Thread 1: linkRef.get() == null is true so it enters into the if part. \r\n- Thread 2: linkRef.get() == null is true so it enters into the if part. \r\n- Thread 1: Push the value to the queue and submit the ConnectFutureTask cf\r\n- Thread 1: Call transport.open and the transport set the link. \r\n- Thread 1: Call setLink(link) and set the linkRef and call consumeQueue()\r\n- Thread 1: Consume all the values which are in the queue. \r\n- Thread 2: Push the value to the queue and get the link from transport.get(value.remoteAddress()) \r\n- Thread 2: link != null is true so it calls setLink(link) \r\n- Thread 2: linkRef.compareAndSet(null, link) is false so it ends.\r\n\r\nIf the above scenario happens, it doesn't send the value of thread 2. So I just adds the \"else\" part in order to send the remaining values.","created_at":"2014-07-19T04:25:14Z","updated_at":"2014-07-19T06:52:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a32c135da60256332a7e060c65e2bab4cae8bfec","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft-CISL/Wake/pulls/35/commits","review_comments_url":"https://api.github.com/repos/Microsoft-CISL/Wake/pulls/35/comments","review_comment_url":"https://api.github.com/repos/Microsoft-CISL/Wake/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Microsoft-CISL/Wake/issues/35/comments","statuses_url":"https://api.github.com/repos/Microsoft-CISL/Wake/statuses/e4a14af7656f3cc019d398c6df8408cd18c59b86","head":{"label":"taegeonum:master","ref":"master","sha":"e4a14af7656f3cc019d398c6df8408cd18c59b86","user":{"login":"taegeonum","id":1371383,"avatar_url":"https://avatars.githubusercontent.com/u/1371383?","gravatar_id":"6445ef0d22332703d00c1da4c4638bad","url":"https://api.github.com/users/taegeonum","html_url":"https://github.com/taegeonum","followers_url":"https://api.github.com/users/taegeonum/followers","following_url":"https://api.github.com/users/taegeonum/following{/other_user}","gists_url":"https://api.github.com/users/taegeonum/gists{/gist_id}","starred_url":"https://api.github.com/users/taegeonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taegeonum/subscriptions","organizations_url":"https://api.github.com/users/taegeonum/orgs","repos_url":"https://api.github.com/users/taegeonum/repos","events_url":"https://api.github.com/users/taegeonum/events{/privacy}","received_events_url":"https://api.github.com/users/taegeonum/received_events","type":"User","site_admin":false},"repo":{"id":19853108,"name":"Wake","full_name":"taegeonum/Wake","owner":{"login":"taegeonum","id":1371383,"avatar_url":"https://avatars.githubusercontent.com/u/1371383?","gravatar_id":"6445ef0d22332703d00c1da4c4638bad","url":"https://api.github.com/users/taegeonum","html_url":"https://github.com/taegeonum","followers_url":"https://api.github.com/users/taegeonum/followers","following_url":"https://api.github.com/users/taegeonum/following{/other_user}","gists_url":"https://api.github.com/users/taegeonum/gists{/gist_id}","starred_url":"https://api.github.com/users/taegeonum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taegeonum/subscriptions","organizations_url":"https://api.github.com/users/taegeonum/orgs","repos_url":"https://api.github.com/users/taegeonum/repos","events_url":"https://api.github.com/users/taegeonum/events{/privacy}","received_events_url":"https://api.github.com/users/taegeonum/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/taegeonum/Wake","description":"Wake is an event-driven framework based on ideas from SEDA, Click, Akka and Rx.","fork":true,"url":"https://api.github.com/repos/taegeonum/Wake","forks_url":"https://api.github.com/repos/taegeonum/Wake/forks","keys_url":"https://api.github.com/repos/taegeonum/Wake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/taegeonum/Wake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/taegeonum/Wake/teams","hooks_url":"https://api.github.com/repos/taegeonum/Wake/hooks","issue_events_url":"https://api.github.com/repos/taegeonum/Wake/issues/events{/number}","events_url":"https://api.github.com/repos/taegeonum/Wake/events","assignees_url":"https://api.github.com/repos/taegeonum/Wake/assignees{/user}","branches_url":"https://api.github.com/repos/taegeonum/Wake/branches{/branch}","tags_url":"https://api.github.com/repos/taegeonum/Wake/tags","blobs_url":"https://api.github.com/repos/taegeonum/Wake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/taegeonum/Wake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/taegeonum/Wake/git/refs{/sha}","trees_url":"https://api.github.com/repos/taegeonum/Wake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/taegeonum/Wake/statuses/{sha}","languages_url":"https://api.github.com/repos/taegeonum/Wake/languages","stargazers_url":"https://api.github.com/repos/taegeonum/Wake/stargazers","contributors_url":"https://api.github.com/repos/taegeonum/Wake/contributors","subscribers_url":"https://api.github.com/repos/taegeonum/Wake/subscribers","subscription_url":"https://api.github.com/repos/taegeonum/Wake/subscription","commits_url":"https://api.github.com/repos/taegeonum/Wake/commits{/sha}","git_commits_url":"https://api.github.com/repos/taegeonum/Wake/git/commits{/sha}","comments_url":"https://api.github.com/repos/taegeonum/Wake/comments{/number}","issue_comment_url":"https://api.github.com/repos/taegeonum/Wake/issues/comments/{number}","contents_url":"https://api.github.com/repos/taegeonum/Wake/contents/{+path}","compare_url":"https://api.github.com/repos/taegeonum/Wake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/taegeonum/Wake/merges","archive_url":"https://api.github.com/repos/taegeonum/Wake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/taegeonum/Wake/downloads","issues_url":"https://api.github.com/repos/taegeonum/Wake/issues{/number}","pulls_url":"https://api.github.com/repos/taegeonum/Wake/pulls{/number}","milestones_url":"https://api.github.com/repos/taegeonum/Wake/milestones{/number}","notifications_url":"https://api.github.com/repos/taegeonum/Wake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/taegeonum/Wake/labels{/name}","releases_url":"https://api.github.com/repos/taegeonum/Wake/releases{/id}","created_at":"2014-05-16T10:39:08Z","updated_at":"2014-06-30T02:28:29Z","pushed_at":"2014-07-18T07:11:55Z","git_url":"git://github.com/taegeonum/Wake.git","ssh_url":"git@github.com:taegeonum/Wake.git","clone_url":"https://github.com/taegeonum/Wake.git","svn_url":"https://github.com/taegeonum/Wake","homepage":"http://www.reef-project.org","size":668,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Microsoft-CISL:bgchun-upgrade-netty","ref":"bgchun-upgrade-netty","sha":"2ad183ebd177f47a1a05939c4bd439b387e46628","user":{"login":"Microsoft-CISL","id":2067733,"avatar_url":"https://avatars.githubusercontent.com/u/2067733?","gravatar_id":"216b41f9ce94882643e74aaf2d6d4989","url":"https://api.github.com/users/Microsoft-CISL","html_url":"https://github.com/Microsoft-CISL","followers_url":"https://api.github.com/users/Microsoft-CISL/followers","following_url":"https://api.github.com/users/Microsoft-CISL/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft-CISL/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft-CISL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft-CISL/subscriptions","organizations_url":"https://api.github.com/users/Microsoft-CISL/orgs","repos_url":"https://api.github.com/users/Microsoft-CISL/repos","events_url":"https://api.github.com/users/Microsoft-CISL/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft-CISL/received_events","type":"Organization","site_admin":false},"repo":{"id":14214834,"name":"Wake","full_name":"Microsoft-CISL/Wake","owner":{"login":"Microsoft-CISL","id":2067733,"avatar_url":"https://avatars.githubusercontent.com/u/2067733?","gravatar_id":"216b41f9ce94882643e74aaf2d6d4989","url":"https://api.github.com/users/Microsoft-CISL","html_url":"https://github.com/Microsoft-CISL","followers_url":"https://api.github.com/users/Microsoft-CISL/followers","following_url":"https://api.github.com/users/Microsoft-CISL/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft-CISL/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft-CISL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft-CISL/subscriptions","organizations_url":"https://api.github.com/users/Microsoft-CISL/orgs","repos_url":"https://api.github.com/users/Microsoft-CISL/repos","events_url":"https://api.github.com/users/Microsoft-CISL/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft-CISL/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft-CISL/Wake","description":"Wake is an event-driven framework based on ideas from SEDA, Click, Akka and Rx.","fork":false,"url":"https://api.github.com/repos/Microsoft-CISL/Wake","forks_url":"https://api.github.com/repos/Microsoft-CISL/Wake/forks","keys_url":"https://api.github.com/repos/Microsoft-CISL/Wake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft-CISL/Wake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft-CISL/Wake/teams","hooks_url":"https://api.github.com/repos/Microsoft-CISL/Wake/hooks","issue_events_url":"https://api.github.com/repos/Microsoft-CISL/Wake/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft-CISL/Wake/events","assignees_url":"https://api.github.com/repos/Microsoft-CISL/Wake/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft-CISL/Wake/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft-CISL/Wake/tags","blobs_url":"https://api.github.com/repos/Microsoft-CISL/Wake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft-CISL/Wake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft-CISL/Wake/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft-CISL/Wake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft-CISL/Wake/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft-CISL/Wake/languages","stargazers_url":"https://api.github.com/repos/Microsoft-CISL/Wake/stargazers","contributors_url":"https://api.github.com/repos/Microsoft-CISL/Wake/contributors","subscribers_url":"https://api.github.com/repos/Microsoft-CISL/Wake/subscribers","subscription_url":"https://api.github.com/repos/Microsoft-CISL/Wake/subscription","commits_url":"https://api.github.com/repos/Microsoft-CISL/Wake/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft-CISL/Wake/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft-CISL/Wake/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft-CISL/Wake/issues/comments/{number}","contents_url":"https://api.github.com/repos/Microsoft-CISL/Wake/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft-CISL/Wake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft-CISL/Wake/merges","archive_url":"https://api.github.com/repos/Microsoft-CISL/Wake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft-CISL/Wake/downloads","issues_url":"https://api.github.com/repos/Microsoft-CISL/Wake/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft-CISL/Wake/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft-CISL/Wake/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft-CISL/Wake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft-CISL/Wake/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft-CISL/Wake/releases{/id}","created_at":"2013-11-07T20:22:07Z","updated_at":"2014-07-19T04:40:27Z","pushed_at":"2014-07-06T11:57:56Z","git_url":"git://github.com/Microsoft-CISL/Wake.git","ssh_url":"git@github.com:Microsoft-CISL/Wake.git","clone_url":"https://github.com/Microsoft-CISL/Wake.git","svn_url":"https://github.com/Microsoft-CISL/Wake","homepage":"http://www.reef-project.org","size":2000,"stargazers_count":9,"watchers_count":9,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":2,"mirror_url":null,"open_issues_count":11,"forks":2,"open_issues":11,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft-CISL/Wake/pulls/35"},"html":{"href":"https://github.com/Microsoft-CISL/Wake/pull/35"},"issue":{"href":"https://api.github.com/repos/Microsoft-CISL/Wake/issues/35"},"comments":{"href":"https://api.github.com/repos/Microsoft-CISL/Wake/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft-CISL/Wake/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft-CISL/Wake/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Microsoft-CISL/Wake/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft-CISL/Wake/statuses/e4a14af7656f3cc019d398c6df8408cd18c59b86"}}}}