{"action":"created","comment":{"url":"https://api.github.com/repos/apache/kafka/pulls/comments/167115810","pull_request_review_id":95288925,"id":167115810,"diff_hunk":"@@ -87,6 +87,21 @@\n \n     public static final long NO_IDLE_TIMEOUT_MS = -1;\n \n+    private enum CloseMode {\n+        LOCAL_CLOSE(false, false),","path":"clients/src/main/java/org/apache/kafka/common/network/Selector.java","position":5,"original_position":5,"commit_id":"698508bc148dfa40d9c124dbc13dc7643f96a269","original_commit_id":"698508bc148dfa40d9c124dbc13dc7643f96a269","user":{"login":"hachikuji","id":12502538,"avatar_url":"https://avatars3.githubusercontent.com/u/12502538?v=4","gravatar_id":"","url":"https://api.github.com/users/hachikuji","html_url":"https://github.com/hachikuji","followers_url":"https://api.github.com/users/hachikuji/followers","following_url":"https://api.github.com/users/hachikuji/following{/other_user}","gists_url":"https://api.github.com/users/hachikuji/gists{/gist_id}","starred_url":"https://api.github.com/users/hachikuji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hachikuji/subscriptions","organizations_url":"https://api.github.com/users/hachikuji/orgs","repos_url":"https://api.github.com/users/hachikuji/repos","events_url":"https://api.github.com/users/hachikuji/events{/privacy}","received_events_url":"https://api.github.com/users/hachikuji/received_events","type":"User","site_admin":false},"body":"Yeah, I agree. Here's my attempt:\r\n\r\nFAILED_SEND, LOCAL_CLOSE -> FORCED\r\nEXPIRED, DISCONNECTED -> GRACEFUL\r\nDISCONNECTED_AND_FAILED_SEND -> NOTIFY_ONLY\r\n\r\nIf we can't come up with good names, we could also revert and use the two boolean parameters.","created_at":"2018-02-09T01:06:18Z","updated_at":"2018-02-09T01:06:19Z","html_url":"https://github.com/apache/kafka/pull/4517#discussion_r167115810","pull_request_url":"https://api.github.com/repos/apache/kafka/pulls/4517","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments/167115810"},"html":{"href":"https://github.com/apache/kafka/pull/4517#discussion_r167115810"},"pull_request":{"href":"https://api.github.com/repos/apache/kafka/pulls/4517"}},"in_reply_to_id":167094952},"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/4517","id":166923548,"html_url":"https://github.com/apache/kafka/pull/4517","diff_url":"https://github.com/apache/kafka/pull/4517.diff","patch_url":"https://github.com/apache/kafka/pull/4517.patch","issue_url":"https://api.github.com/repos/apache/kafka/issues/4517","number":4517,"state":"open","locked":false,"title":"KAFKA-6529: Stop file descriptor leak when client disconnects with staged receives","user":{"login":"parafiend","id":14987404,"avatar_url":"https://avatars1.githubusercontent.com/u/14987404?v=4","gravatar_id":"","url":"https://api.github.com/users/parafiend","html_url":"https://github.com/parafiend","followers_url":"https://api.github.com/users/parafiend/followers","following_url":"https://api.github.com/users/parafiend/following{/other_user}","gists_url":"https://api.github.com/users/parafiend/gists{/gist_id}","starred_url":"https://api.github.com/users/parafiend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parafiend/subscriptions","organizations_url":"https://api.github.com/users/parafiend/orgs","repos_url":"https://api.github.com/users/parafiend/repos","events_url":"https://api.github.com/users/parafiend/events{/privacy}","received_events_url":"https://api.github.com/users/parafiend/received_events","type":"User","site_admin":false},"body":"If an exception is encountered while sending data to a client\r\nconnection, that connection is disconnected. If there are staged\r\nreceives for that connection, it is tracked to process those records.\r\nHowever, if the exception was encountered during processing a\r\n`RequestChannel.Request`, the `KafkaChannel` for that connection is\r\nmuted and won't be processed.\r\n\r\nAdd the channel to failed sends so the connection is cleaned up on those\r\nexceptions. This stops the leak of the memory for pending requests\r\nand the file descriptor of the TCP socket.\r\n\r\nOnly flag channel as failed send when an exception is encountered while\r\nactually attempting to send something. Other socket interactions don't\r\ncount.\r\n\r\nTest that a channel is closed when an exception is raised while writing to\r\na socket that has been closed by the client. Since sending a response \r\nrequires acks != 0, allow specifying the required acks for test requests\r\nin SocketServerTest.scala.\r\n\r\n### Committer Checklist (excluded from commit message)\r\n- [ ] Verify design and implementation \r\n- [ ] Verify test coverage and CI build status\r\n- [ ] Verify documentation (including upgrade notes)\r\n","created_at":"2018-02-02T23:03:43Z","updated_at":"2018-02-09T01:06:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"371444e8fce1a22aa4a0a6487641734f3ab12316","assignee":{"login":"rajinisivaram","id":13164074,"avatar_url":"https://avatars0.githubusercontent.com/u/13164074?v=4","gravatar_id":"","url":"https://api.github.com/users/rajinisivaram","html_url":"https://github.com/rajinisivaram","followers_url":"https://api.github.com/users/rajinisivaram/followers","following_url":"https://api.github.com/users/rajinisivaram/following{/other_user}","gists_url":"https://api.github.com/users/rajinisivaram/gists{/gist_id}","starred_url":"https://api.github.com/users/rajinisivaram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajinisivaram/subscriptions","organizations_url":"https://api.github.com/users/rajinisivaram/orgs","repos_url":"https://api.github.com/users/rajinisivaram/repos","events_url":"https://api.github.com/users/rajinisivaram/events{/privacy}","received_events_url":"https://api.github.com/users/rajinisivaram/received_events","type":"User","site_admin":false},"assignees":[{"login":"rajinisivaram","id":13164074,"avatar_url":"https://avatars0.githubusercontent.com/u/13164074?v=4","gravatar_id":"","url":"https://api.github.com/users/rajinisivaram","html_url":"https://github.com/rajinisivaram","followers_url":"https://api.github.com/users/rajinisivaram/followers","following_url":"https://api.github.com/users/rajinisivaram/following{/other_user}","gists_url":"https://api.github.com/users/rajinisivaram/gists{/gist_id}","starred_url":"https://api.github.com/users/rajinisivaram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajinisivaram/subscriptions","organizations_url":"https://api.github.com/users/rajinisivaram/orgs","repos_url":"https://api.github.com/users/rajinisivaram/repos","events_url":"https://api.github.com/users/rajinisivaram/events{/privacy}","received_events_url":"https://api.github.com/users/rajinisivaram/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/kafka/pulls/4517/commits","review_comments_url":"https://api.github.com/repos/apache/kafka/pulls/4517/comments","review_comment_url":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/kafka/issues/4517/comments","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/698508bc148dfa40d9c124dbc13dc7643f96a269","head":{"label":"parafiend:kafka-6529_socket_leak_fix","ref":"kafka-6529_socket_leak_fix","sha":"698508bc148dfa40d9c124dbc13dc7643f96a269","user":{"login":"parafiend","id":14987404,"avatar_url":"https://avatars1.githubusercontent.com/u/14987404?v=4","gravatar_id":"","url":"https://api.github.com/users/parafiend","html_url":"https://github.com/parafiend","followers_url":"https://api.github.com/users/parafiend/followers","following_url":"https://api.github.com/users/parafiend/following{/other_user}","gists_url":"https://api.github.com/users/parafiend/gists{/gist_id}","starred_url":"https://api.github.com/users/parafiend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parafiend/subscriptions","organizations_url":"https://api.github.com/users/parafiend/orgs","repos_url":"https://api.github.com/users/parafiend/repos","events_url":"https://api.github.com/users/parafiend/events{/privacy}","received_events_url":"https://api.github.com/users/parafiend/received_events","type":"User","site_admin":false},"repo":{"id":119586262,"name":"kafka","full_name":"parafiend/kafka","owner":{"login":"parafiend","id":14987404,"avatar_url":"https://avatars1.githubusercontent.com/u/14987404?v=4","gravatar_id":"","url":"https://api.github.com/users/parafiend","html_url":"https://github.com/parafiend","followers_url":"https://api.github.com/users/parafiend/followers","following_url":"https://api.github.com/users/parafiend/following{/other_user}","gists_url":"https://api.github.com/users/parafiend/gists{/gist_id}","starred_url":"https://api.github.com/users/parafiend/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parafiend/subscriptions","organizations_url":"https://api.github.com/users/parafiend/orgs","repos_url":"https://api.github.com/users/parafiend/repos","events_url":"https://api.github.com/users/parafiend/events{/privacy}","received_events_url":"https://api.github.com/users/parafiend/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/parafiend/kafka","description":"Mirror of Apache Kafka","fork":true,"url":"https://api.github.com/repos/parafiend/kafka","forks_url":"https://api.github.com/repos/parafiend/kafka/forks","keys_url":"https://api.github.com/repos/parafiend/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/parafiend/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/parafiend/kafka/teams","hooks_url":"https://api.github.com/repos/parafiend/kafka/hooks","issue_events_url":"https://api.github.com/repos/parafiend/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/parafiend/kafka/events","assignees_url":"https://api.github.com/repos/parafiend/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/parafiend/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/parafiend/kafka/tags","blobs_url":"https://api.github.com/repos/parafiend/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/parafiend/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/parafiend/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/parafiend/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/parafiend/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/parafiend/kafka/languages","stargazers_url":"https://api.github.com/repos/parafiend/kafka/stargazers","contributors_url":"https://api.github.com/repos/parafiend/kafka/contributors","subscribers_url":"https://api.github.com/repos/parafiend/kafka/subscribers","subscription_url":"https://api.github.com/repos/parafiend/kafka/subscription","commits_url":"https://api.github.com/repos/parafiend/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/parafiend/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/parafiend/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/parafiend/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/parafiend/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/parafiend/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/parafiend/kafka/merges","archive_url":"https://api.github.com/repos/parafiend/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/parafiend/kafka/downloads","issues_url":"https://api.github.com/repos/parafiend/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/parafiend/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/parafiend/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/parafiend/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/parafiend/kafka/labels{/name}","releases_url":"https://api.github.com/repos/parafiend/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/parafiend/kafka/deployments","created_at":"2018-01-30T19:50:22Z","updated_at":"2018-01-30T19:50:33Z","pushed_at":"2018-02-08T22:11:46Z","git_url":"git://github.com/parafiend/kafka.git","ssh_url":"git@github.com:parafiend/kafka.git","clone_url":"https://github.com/parafiend/kafka.git","svn_url":"https://github.com/parafiend/kafka","homepage":null,"size":62068,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"trunk"}},"base":{"label":"apache:trunk","ref":"trunk","sha":"f6bbec4af2f1842ea7be35899e3c7d60179ab2fb","user":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":2211243,"name":"kafka","full_name":"apache/kafka","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/kafka","description":"Mirror of Apache Kafka","fork":false,"url":"https://api.github.com/repos/apache/kafka","forks_url":"https://api.github.com/repos/apache/kafka/forks","keys_url":"https://api.github.com/repos/apache/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/kafka/teams","hooks_url":"https://api.github.com/repos/apache/kafka/hooks","issue_events_url":"https://api.github.com/repos/apache/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/apache/kafka/events","assignees_url":"https://api.github.com/repos/apache/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/apache/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/apache/kafka/tags","blobs_url":"https://api.github.com/repos/apache/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/kafka/languages","stargazers_url":"https://api.github.com/repos/apache/kafka/stargazers","contributors_url":"https://api.github.com/repos/apache/kafka/contributors","subscribers_url":"https://api.github.com/repos/apache/kafka/subscribers","subscription_url":"https://api.github.com/repos/apache/kafka/subscription","commits_url":"https://api.github.com/repos/apache/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/apache/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/kafka/merges","archive_url":"https://api.github.com/repos/apache/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/kafka/downloads","issues_url":"https://api.github.com/repos/apache/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/apache/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/kafka/labels{/name}","releases_url":"https://api.github.com/repos/apache/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/apache/kafka/deployments","created_at":"2011-08-15T18:06:16Z","updated_at":"2018-02-08T23:34:31Z","pushed_at":"2018-02-09T00:28:31Z","git_url":"git://github.com/apache/kafka.git","ssh_url":"git@github.com:apache/kafka.git","clone_url":"https://github.com/apache/kafka.git","svn_url":"https://github.com/apache/kafka","homepage":null,"size":62685,"stargazers_count":7373,"watchers_count":7373,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4420,"mirror_url":null,"archived":false,"open_issues_count":443,"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":4420,"open_issues":443,"watchers":7373,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/4517"},"html":{"href":"https://github.com/apache/kafka/pull/4517"},"issue":{"href":"https://api.github.com/repos/apache/kafka/issues/4517"},"comments":{"href":"https://api.github.com/repos/apache/kafka/issues/4517/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/kafka/pulls/4517/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/kafka/pulls/4517/commits"},"statuses":{"href":"https://api.github.com/repos/apache/kafka/statuses/698508bc148dfa40d9c124dbc13dc7643f96a269"}},"author_association":"NONE"}}
{"actor":{"display_login":"hachikuji"}}