{"action":"created","comment":{"url":"https://api.github.com/repos/apache/flink/pulls/comments/170027206","pull_request_review_id":98649815,"id":170027206,"diff_hunk":"@@ -337,6 +337,11 @@ public int getSenderBacklog() {\n \t\treturn numRequiredBuffers - initialCredit;\n \t}\n \n+\t@VisibleForTesting\n+\tpublic boolean isWaitingForFloatingBuffers() {","path":"flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java","position":5,"original_position":5,"commit_id":"10ad6db14d072a5208c45c4be08624ebd7e8ea13","original_commit_id":"10ad6db14d072a5208c45c4be08624ebd7e8ea13","user":{"login":"NicoK","id":213026,"avatar_url":"https://avatars1.githubusercontent.com/u/213026?v=4","gravatar_id":"","url":"https://api.github.com/users/NicoK","html_url":"https://github.com/NicoK","followers_url":"https://api.github.com/users/NicoK/followers","following_url":"https://api.github.com/users/NicoK/following{/other_user}","gists_url":"https://api.github.com/users/NicoK/gists{/gist_id}","starred_url":"https://api.github.com/users/NicoK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicoK/subscriptions","organizations_url":"https://api.github.com/users/NicoK/orgs","repos_url":"https://api.github.com/users/NicoK/repos","events_url":"https://api.github.com/users/NicoK/events{/privacy}","received_events_url":"https://api.github.com/users/NicoK/received_events","type":"User","site_admin":false},"body":"I think, this could be package-private","created_at":"2018-02-22T17:05:19Z","updated_at":"2018-02-22T17:13:35Z","html_url":"https://github.com/apache/flink/pull/5558#discussion_r170027206","pull_request_url":"https://api.github.com/repos/apache/flink/pulls/5558","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/comments/170027206"},"html":{"href":"https://github.com/apache/flink/pull/5558#discussion_r170027206"},"pull_request":{"href":"https://api.github.com/repos/apache/flink/pulls/5558"}}},"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/5558","id":170770538,"html_url":"https://github.com/apache/flink/pull/5558","diff_url":"https://github.com/apache/flink/pull/5558.diff","patch_url":"https://github.com/apache/flink/pull/5558.patch","issue_url":"https://api.github.com/repos/apache/flink/issues/5558","number":5558,"state":"open","locked":false,"title":"[FLINK-8747][bugfix] The tag of waiting for floating buffers in RemoteInputChannel should be updated properly","user":{"login":"zhijiangW","id":12387855,"avatar_url":"https://avatars0.githubusercontent.com/u/12387855?v=4","gravatar_id":"","url":"https://api.github.com/users/zhijiangW","html_url":"https://github.com/zhijiangW","followers_url":"https://api.github.com/users/zhijiangW/followers","following_url":"https://api.github.com/users/zhijiangW/following{/other_user}","gists_url":"https://api.github.com/users/zhijiangW/gists{/gist_id}","starred_url":"https://api.github.com/users/zhijiangW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhijiangW/subscriptions","organizations_url":"https://api.github.com/users/zhijiangW/orgs","repos_url":"https://api.github.com/users/zhijiangW/repos","events_url":"https://api.github.com/users/zhijiangW/events{/privacy}","received_events_url":"https://api.github.com/users/zhijiangW/received_events","type":"User","site_admin":false},"body":"## What is the purpose of the change\r\n\r\n*In credit-based flow control mode, when the number of available buffers is less than required buffers (backlog + initialCredit), the `RemoteInputChannel` will request floating buffers from `BufferProvider`. If not get enough available floating buffers, the `RemoteInputChannel` registers itself as listener in `BufferProvider` and updates the tag `isWaitingForFloatingBuffers` as true to avoid registration repeatedly.*\r\n\r\n *When a floating buffer is recycled to `BufferProvider`, it will notify the listener of available buffer. But the listener may not need floating buffers currently if the available buffers is not less than required buffers, then the floating buffers will be returned to BufferProvider directly. Most importantly, the tag `isWaitingForFloatingBuffers` should also be updated as false, otherwise the `RemoteInputChannel` will not request floating buffers any more after the available buffers less than required buffers.*\r\n\r\n*There are two scenarios for causing the above issue:*\r\n\r\n- The recycled exclusive buffers increase the total available buffers which is equal to or more than required buffers.\r\n- The decreased sender's backlog resulting the available buffers equal to required buffers.\r\n\r\n## Brief change log\r\n\r\n  - *Updates the tag `isWaitingForFloatingBuffers` false on `notifyBufferAvailable` if current available buffers is not less than required buffers*\r\n\r\n## Verifying this change\r\n\r\nThis change added tests and can be verified as follows:\r\n\r\n  - *Modify `RemoteInputChannelTest#testAvailableBuffersLessThanRequiredBuffers to cover this case*\r\n\r\n## Does this pull request potentially affect one of the following parts:\r\n\r\n  - Dependencies (does it add or upgrade a dependency): (no)\r\n  - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)\r\n  - The serializers: (no)\r\n  - The runtime per-record code paths (performance sensitive): (no)\r\n  - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)\r\n  - The S3 file system connector: (no)\r\n\r\n## Documentation\r\n\r\n  - Does this pull request introduce a new feature? (no)\r\n  - If yes, how is the feature documented? (not applicable)\r\n","created_at":"2018-02-22T14:48:37Z","updated_at":"2018-02-22T17:13:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e04ee249ecce3c3c75afefad046cb8c0bcd42a1e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/flink/pulls/5558/commits","review_comments_url":"https://api.github.com/repos/apache/flink/pulls/5558/comments","review_comment_url":"https://api.github.com/repos/apache/flink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/flink/issues/5558/comments","statuses_url":"https://api.github.com/repos/apache/flink/statuses/10ad6db14d072a5208c45c4be08624ebd7e8ea13","head":{"label":"zhijiangW:FLINK-8747","ref":"FLINK-8747","sha":"10ad6db14d072a5208c45c4be08624ebd7e8ea13","user":{"login":"zhijiangW","id":12387855,"avatar_url":"https://avatars0.githubusercontent.com/u/12387855?v=4","gravatar_id":"","url":"https://api.github.com/users/zhijiangW","html_url":"https://github.com/zhijiangW","followers_url":"https://api.github.com/users/zhijiangW/followers","following_url":"https://api.github.com/users/zhijiangW/following{/other_user}","gists_url":"https://api.github.com/users/zhijiangW/gists{/gist_id}","starred_url":"https://api.github.com/users/zhijiangW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhijiangW/subscriptions","organizations_url":"https://api.github.com/users/zhijiangW/orgs","repos_url":"https://api.github.com/users/zhijiangW/repos","events_url":"https://api.github.com/users/zhijiangW/events{/privacy}","received_events_url":"https://api.github.com/users/zhijiangW/received_events","type":"User","site_admin":false},"repo":{"id":60976697,"name":"flink","full_name":"zhijiangW/flink","owner":{"login":"zhijiangW","id":12387855,"avatar_url":"https://avatars0.githubusercontent.com/u/12387855?v=4","gravatar_id":"","url":"https://api.github.com/users/zhijiangW","html_url":"https://github.com/zhijiangW","followers_url":"https://api.github.com/users/zhijiangW/followers","following_url":"https://api.github.com/users/zhijiangW/following{/other_user}","gists_url":"https://api.github.com/users/zhijiangW/gists{/gist_id}","starred_url":"https://api.github.com/users/zhijiangW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhijiangW/subscriptions","organizations_url":"https://api.github.com/users/zhijiangW/orgs","repos_url":"https://api.github.com/users/zhijiangW/repos","events_url":"https://api.github.com/users/zhijiangW/events{/privacy}","received_events_url":"https://api.github.com/users/zhijiangW/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zhijiangW/flink","description":"Mirror of Apache Flink","fork":true,"url":"https://api.github.com/repos/zhijiangW/flink","forks_url":"https://api.github.com/repos/zhijiangW/flink/forks","keys_url":"https://api.github.com/repos/zhijiangW/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zhijiangW/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zhijiangW/flink/teams","hooks_url":"https://api.github.com/repos/zhijiangW/flink/hooks","issue_events_url":"https://api.github.com/repos/zhijiangW/flink/issues/events{/number}","events_url":"https://api.github.com/repos/zhijiangW/flink/events","assignees_url":"https://api.github.com/repos/zhijiangW/flink/assignees{/user}","branches_url":"https://api.github.com/repos/zhijiangW/flink/branches{/branch}","tags_url":"https://api.github.com/repos/zhijiangW/flink/tags","blobs_url":"https://api.github.com/repos/zhijiangW/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zhijiangW/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zhijiangW/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/zhijiangW/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zhijiangW/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/zhijiangW/flink/languages","stargazers_url":"https://api.github.com/repos/zhijiangW/flink/stargazers","contributors_url":"https://api.github.com/repos/zhijiangW/flink/contributors","subscribers_url":"https://api.github.com/repos/zhijiangW/flink/subscribers","subscription_url":"https://api.github.com/repos/zhijiangW/flink/subscription","commits_url":"https://api.github.com/repos/zhijiangW/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/zhijiangW/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/zhijiangW/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/zhijiangW/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/zhijiangW/flink/contents/{+path}","compare_url":"https://api.github.com/repos/zhijiangW/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zhijiangW/flink/merges","archive_url":"https://api.github.com/repos/zhijiangW/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zhijiangW/flink/downloads","issues_url":"https://api.github.com/repos/zhijiangW/flink/issues{/number}","pulls_url":"https://api.github.com/repos/zhijiangW/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/zhijiangW/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/zhijiangW/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zhijiangW/flink/labels{/name}","releases_url":"https://api.github.com/repos/zhijiangW/flink/releases{/id}","deployments_url":"https://api.github.com/repos/zhijiangW/flink/deployments","created_at":"2016-06-12T16:16:49Z","updated_at":"2016-06-12T16:17:14Z","pushed_at":"2018-02-22T14:42:09Z","git_url":"git://github.com/zhijiangW/flink.git","ssh_url":"git@github.com:zhijiangW/flink.git","clone_url":"https://github.com/zhijiangW/flink.git","svn_url":"https://github.com/zhijiangW/flink","homepage":null,"size":143952,"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":"master"}},"base":{"label":"apache:master","ref":"master","sha":"e96f28bd381bbca6c5f7b0572c4527b9f3c7952a","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":20587599,"name":"flink","full_name":"apache/flink","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/flink","description":"Mirror of Apache Flink","fork":false,"url":"https://api.github.com/repos/apache/flink","forks_url":"https://api.github.com/repos/apache/flink/forks","keys_url":"https://api.github.com/repos/apache/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/flink/teams","hooks_url":"https://api.github.com/repos/apache/flink/hooks","issue_events_url":"https://api.github.com/repos/apache/flink/issues/events{/number}","events_url":"https://api.github.com/repos/apache/flink/events","assignees_url":"https://api.github.com/repos/apache/flink/assignees{/user}","branches_url":"https://api.github.com/repos/apache/flink/branches{/branch}","tags_url":"https://api.github.com/repos/apache/flink/tags","blobs_url":"https://api.github.com/repos/apache/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/flink/languages","stargazers_url":"https://api.github.com/repos/apache/flink/stargazers","contributors_url":"https://api.github.com/repos/apache/flink/contributors","subscribers_url":"https://api.github.com/repos/apache/flink/subscribers","subscription_url":"https://api.github.com/repos/apache/flink/subscription","commits_url":"https://api.github.com/repos/apache/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/flink/contents/{+path}","compare_url":"https://api.github.com/repos/apache/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/flink/merges","archive_url":"https://api.github.com/repos/apache/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/flink/downloads","issues_url":"https://api.github.com/repos/apache/flink/issues{/number}","pulls_url":"https://api.github.com/repos/apache/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/flink/labels{/name}","releases_url":"https://api.github.com/repos/apache/flink/releases{/id}","deployments_url":"https://api.github.com/repos/apache/flink/deployments","created_at":"2014-06-07T07:00:10Z","updated_at":"2018-02-22T07:51:10Z","pushed_at":"2018-02-22T16:39:53Z","git_url":"git://github.com/apache/flink.git","ssh_url":"git@github.com:apache/flink.git","clone_url":"https://github.com/apache/flink.git","svn_url":"https://github.com/apache/flink","homepage":null,"size":147616,"stargazers_count":3303,"watchers_count":3303,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2268,"mirror_url":null,"archived":false,"open_issues_count":319,"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":2268,"open_issues":319,"watchers":3303,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/5558"},"html":{"href":"https://github.com/apache/flink/pull/5558"},"issue":{"href":"https://api.github.com/repos/apache/flink/issues/5558"},"comments":{"href":"https://api.github.com/repos/apache/flink/issues/5558/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/flink/pulls/5558/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/flink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/flink/pulls/5558/commits"},"statuses":{"href":"https://api.github.com/repos/apache/flink/statuses/10ad6db14d072a5208c45c4be08624ebd7e8ea13"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"NicoK"}}