{"action":"created","comment":{"url":"https://api.github.com/repos/apache/flink/pulls/comments/152847273","pull_request_review_id":78772444,"id":152847273,"diff_hunk":"@@ -300,6 +315,230 @@ public void testConsumeSpillablePartitionSpilledDuringConsume() throws Exception\n \t\tassertTrue(buffer.isRecycled());\n \t}\n \n+\t/**","path":"flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/SpillableSubpartitionTest.java","position":null,"original_position":61,"commit_id":"5c849c11157899f30c684938a63ecd0ed347c53c","original_commit_id":"5c849c11157899f30c684938a63ecd0ed347c53c","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":"you're right - some tests actually share most of their code. I'll extract a common test method to reduce some code.","created_at":"2017-11-23T17:02:07Z","updated_at":"2017-11-23T17:02:07Z","html_url":"https://github.com/apache/flink/pull/4581#discussion_r152847273","pull_request_url":"https://api.github.com/repos/apache/flink/pulls/4581","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/comments/152847273"},"html":{"href":"https://github.com/apache/flink/pull/4581#discussion_r152847273"},"pull_request":{"href":"https://api.github.com/repos/apache/flink/pulls/4581"}},"in_reply_to_id":152837725},"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/4581","id":137466550,"html_url":"https://github.com/apache/flink/pull/4581","diff_url":"https://github.com/apache/flink/pull/4581.diff","patch_url":"https://github.com/apache/flink/pull/4581.patch","issue_url":"https://api.github.com/repos/apache/flink/issues/4581","number":4581,"state":"open","locked":false,"title":"[FLINK-7499][io] fix double buffer release in SpillableSubpartitionView","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":"## What is the purpose of the change\r\n\r\n`SpillableSubpartitionView#releaseMemory()` recycled the given buffer twice: once asynchronously after the write operation initiated via `AsynchronousBufferFileWriter#writeBlock()`and once in SpillableSubpartitionView#releaseMemory() after adding the write operation to the queue. Additionally, other uses of `AsynchronousBufferFileWriter#writeBlock()` did not cleanup in an error case which was also not done by `AsynchronousBufferFileWriter#writeBlock()` itself.\r\n\r\nThis PR changes the behaviour of `AsynchronousBufferFileWriter#writeBlock()` to always take care of releasing the buffer, even after the (asynchronous) write operation failed.\r\n\r\n## Brief change log\r\n\r\n- let `AsynchronousBufferFileWriter#writeBlock()` take full recycling responsibility of the given buffer even in case of failures\r\n- remove the additional `recycle` call in `SpillableSubpartitionView#releaseMemory()`\r\n- adapt `SpillableSubpartitionTest` to find the duplicate `recycle()` calls\r\n\r\n## Verifying this change\r\n\r\nThis change added further checks to `SpillableSubpartitionTest` to verify the intended behaviour\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): (yes)\r\n  - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (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":"2017-08-24T14:22:08Z","updated_at":"2017-11-23T17:02:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e2f951b1286a35d9b6653873d7cc95c2d65ab599","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/flink/pulls/4581/commits","review_comments_url":"https://api.github.com/repos/apache/flink/pulls/4581/comments","review_comment_url":"https://api.github.com/repos/apache/flink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/flink/issues/4581/comments","statuses_url":"https://api.github.com/repos/apache/flink/statuses/5c849c11157899f30c684938a63ecd0ed347c53c","head":{"label":"NicoK:flink-7499","ref":"flink-7499","sha":"5c849c11157899f30c684938a63ecd0ed347c53c","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},"repo":{"id":72781206,"name":"flink","full_name":"NicoK/flink","owner":{"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},"private":false,"html_url":"https://github.com/NicoK/flink","description":"Mirror of Apache Flink","fork":true,"url":"https://api.github.com/repos/NicoK/flink","forks_url":"https://api.github.com/repos/NicoK/flink/forks","keys_url":"https://api.github.com/repos/NicoK/flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NicoK/flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NicoK/flink/teams","hooks_url":"https://api.github.com/repos/NicoK/flink/hooks","issue_events_url":"https://api.github.com/repos/NicoK/flink/issues/events{/number}","events_url":"https://api.github.com/repos/NicoK/flink/events","assignees_url":"https://api.github.com/repos/NicoK/flink/assignees{/user}","branches_url":"https://api.github.com/repos/NicoK/flink/branches{/branch}","tags_url":"https://api.github.com/repos/NicoK/flink/tags","blobs_url":"https://api.github.com/repos/NicoK/flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NicoK/flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NicoK/flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/NicoK/flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NicoK/flink/statuses/{sha}","languages_url":"https://api.github.com/repos/NicoK/flink/languages","stargazers_url":"https://api.github.com/repos/NicoK/flink/stargazers","contributors_url":"https://api.github.com/repos/NicoK/flink/contributors","subscribers_url":"https://api.github.com/repos/NicoK/flink/subscribers","subscription_url":"https://api.github.com/repos/NicoK/flink/subscription","commits_url":"https://api.github.com/repos/NicoK/flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/NicoK/flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/NicoK/flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/NicoK/flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/NicoK/flink/contents/{+path}","compare_url":"https://api.github.com/repos/NicoK/flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NicoK/flink/merges","archive_url":"https://api.github.com/repos/NicoK/flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NicoK/flink/downloads","issues_url":"https://api.github.com/repos/NicoK/flink/issues{/number}","pulls_url":"https://api.github.com/repos/NicoK/flink/pulls{/number}","milestones_url":"https://api.github.com/repos/NicoK/flink/milestones{/number}","notifications_url":"https://api.github.com/repos/NicoK/flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NicoK/flink/labels{/name}","releases_url":"https://api.github.com/repos/NicoK/flink/releases{/id}","deployments_url":"https://api.github.com/repos/NicoK/flink/deployments","created_at":"2016-11-03T19:51:01Z","updated_at":"2016-11-03T19:51:25Z","pushed_at":"2017-11-23T14:36:49Z","git_url":"git://github.com/NicoK/flink.git","ssh_url":"git@github.com:NicoK/flink.git","clone_url":"https://github.com/NicoK/flink.git","svn_url":"https://github.com/NicoK/flink","homepage":null,"size":138867,"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,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"d86c6b6bb32adee9d4b5c9098340a34e8a8a7f1d","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":"2017-11-23T16:59:29Z","pushed_at":"2017-11-23T16:59:03Z","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":140008,"stargazers_count":2963,"watchers_count":2963,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2028,"mirror_url":"git://git.apache.org/flink.git","archived":false,"open_issues_count":309,"forks":2028,"open_issues":309,"watchers":2963,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/4581"},"html":{"href":"https://github.com/apache/flink/pull/4581"},"issue":{"href":"https://api.github.com/repos/apache/flink/issues/4581"},"comments":{"href":"https://api.github.com/repos/apache/flink/issues/4581/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/flink/pulls/4581/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/flink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/flink/pulls/4581/commits"},"statuses":{"href":"https://api.github.com/repos/apache/flink/statuses/5c849c11157899f30c684938a63ecd0ed347c53c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"NicoK"}}