{"action":"closed","number":6066,"pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/6066","id":190023350,"html_url":"https://github.com/apache/flink/pull/6066","diff_url":"https://github.com/apache/flink/pull/6066.diff","patch_url":"https://github.com/apache/flink/pull/6066.patch","issue_url":"https://api.github.com/repos/apache/flink/issues/6066","number":6066,"state":"closed","locked":false,"title":"[FLINK-9428] [checkpointing] Allow operators to flush data on checkpoint pre-barrier","user":{"login":"StephanEwen","id":1727146,"avatar_url":"https://avatars3.githubusercontent.com/u/1727146?v=4","gravatar_id":"","url":"https://api.github.com/users/StephanEwen","html_url":"https://github.com/StephanEwen","followers_url":"https://api.github.com/users/StephanEwen/followers","following_url":"https://api.github.com/users/StephanEwen/following{/other_user}","gists_url":"https://api.github.com/users/StephanEwen/gists{/gist_id}","starred_url":"https://api.github.com/users/StephanEwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StephanEwen/subscriptions","organizations_url":"https://api.github.com/users/StephanEwen/orgs","repos_url":"https://api.github.com/users/StephanEwen/repos","events_url":"https://api.github.com/users/StephanEwen/events{/privacy}","received_events_url":"https://api.github.com/users/StephanEwen/received_events","type":"User","site_admin":false},"body":"## What is the purpose of the change\r\n\r\nSome operators maintain some small transient state that may be inefficient to checkpoint, especially when it would need to be checkpointed also in a re-scalable way.\r\nAn example are opportunistic pre-aggregation operators, which have small the pre-aggregation state that is frequently flushed downstream.\r\n\r\nRather that persisting that state in a checkpoint, it can make sense to flush the data downstream upon a checkpoint, to let it be part of the downstream operator's state.\r\n\r\nThis feature is sensitive, because flushing state has a clean implication on the downstream operator's checkpoint alignment. However, used with care, and with the new back-pressure-based checkpoint alignment, this feature can be very useful.\r\n\r\nBecause it is sensitive, this PR makes this an internal feature (accessible to operators) and does NOT expose it in the public API.\r\n\r\n## Brief change log\r\n\r\n  - Adds the `prepareSnapshotPreBarrier(long checkpointId)` call to `(Abstract)StreamOperator`, with an empty default implementation.\r\n  - Adds a call on `OperatorChain` to call this in front-to-back order on the operators.\r\n\r\n## Verifying this change\r\n\r\n  - This change does not yet alter any behavior, it adds only a plug point for future stream operators.\r\n  - The `OperatorChainTest` Unit Test validates that the call happens, and that operators are called in the right order.\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: **yes**\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-05-23T15:48:58Z","updated_at":"2018-05-24T12:04:45Z","closed_at":"2018-05-24T12:04:45Z","merged_at":null,"merge_commit_sha":"d5d2ed36c6113fcac746ad73be25ae6af3fdbb10","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/flink/pulls/6066/commits","review_comments_url":"https://api.github.com/repos/apache/flink/pulls/6066/comments","review_comment_url":"https://api.github.com/repos/apache/flink/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/flink/issues/6066/comments","statuses_url":"https://api.github.com/repos/apache/flink/statuses/cf1c54af0a262bbd980da7156bdafdc937ba06d4","head":{"label":"StephanEwen:pre_barrier","ref":"pre_barrier","sha":"cf1c54af0a262bbd980da7156bdafdc937ba06d4","user":{"login":"StephanEwen","id":1727146,"avatar_url":"https://avatars3.githubusercontent.com/u/1727146?v=4","gravatar_id":"","url":"https://api.github.com/users/StephanEwen","html_url":"https://github.com/StephanEwen","followers_url":"https://api.github.com/users/StephanEwen/followers","following_url":"https://api.github.com/users/StephanEwen/following{/other_user}","gists_url":"https://api.github.com/users/StephanEwen/gists{/gist_id}","starred_url":"https://api.github.com/users/StephanEwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StephanEwen/subscriptions","organizations_url":"https://api.github.com/users/StephanEwen/orgs","repos_url":"https://api.github.com/users/StephanEwen/repos","events_url":"https://api.github.com/users/StephanEwen/events{/privacy}","received_events_url":"https://api.github.com/users/StephanEwen/received_events","type":"User","site_admin":false},"repo":{"id":21171031,"name":"incubator-flink","full_name":"StephanEwen/incubator-flink","owner":{"login":"StephanEwen","id":1727146,"avatar_url":"https://avatars3.githubusercontent.com/u/1727146?v=4","gravatar_id":"","url":"https://api.github.com/users/StephanEwen","html_url":"https://github.com/StephanEwen","followers_url":"https://api.github.com/users/StephanEwen/followers","following_url":"https://api.github.com/users/StephanEwen/following{/other_user}","gists_url":"https://api.github.com/users/StephanEwen/gists{/gist_id}","starred_url":"https://api.github.com/users/StephanEwen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StephanEwen/subscriptions","organizations_url":"https://api.github.com/users/StephanEwen/orgs","repos_url":"https://api.github.com/users/StephanEwen/repos","events_url":"https://api.github.com/users/StephanEwen/events{/privacy}","received_events_url":"https://api.github.com/users/StephanEwen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/StephanEwen/incubator-flink","description":"Mirror of Apache Flink","fork":true,"url":"https://api.github.com/repos/StephanEwen/incubator-flink","forks_url":"https://api.github.com/repos/StephanEwen/incubator-flink/forks","keys_url":"https://api.github.com/repos/StephanEwen/incubator-flink/keys{/key_id}","collaborators_url":"https://api.github.com/repos/StephanEwen/incubator-flink/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/StephanEwen/incubator-flink/teams","hooks_url":"https://api.github.com/repos/StephanEwen/incubator-flink/hooks","issue_events_url":"https://api.github.com/repos/StephanEwen/incubator-flink/issues/events{/number}","events_url":"https://api.github.com/repos/StephanEwen/incubator-flink/events","assignees_url":"https://api.github.com/repos/StephanEwen/incubator-flink/assignees{/user}","branches_url":"https://api.github.com/repos/StephanEwen/incubator-flink/branches{/branch}","tags_url":"https://api.github.com/repos/StephanEwen/incubator-flink/tags","blobs_url":"https://api.github.com/repos/StephanEwen/incubator-flink/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/StephanEwen/incubator-flink/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/StephanEwen/incubator-flink/git/refs{/sha}","trees_url":"https://api.github.com/repos/StephanEwen/incubator-flink/git/trees{/sha}","statuses_url":"https://api.github.com/repos/StephanEwen/incubator-flink/statuses/{sha}","languages_url":"https://api.github.com/repos/StephanEwen/incubator-flink/languages","stargazers_url":"https://api.github.com/repos/StephanEwen/incubator-flink/stargazers","contributors_url":"https://api.github.com/repos/StephanEwen/incubator-flink/contributors","subscribers_url":"https://api.github.com/repos/StephanEwen/incubator-flink/subscribers","subscription_url":"https://api.github.com/repos/StephanEwen/incubator-flink/subscription","commits_url":"https://api.github.com/repos/StephanEwen/incubator-flink/commits{/sha}","git_commits_url":"https://api.github.com/repos/StephanEwen/incubator-flink/git/commits{/sha}","comments_url":"https://api.github.com/repos/StephanEwen/incubator-flink/comments{/number}","issue_comment_url":"https://api.github.com/repos/StephanEwen/incubator-flink/issues/comments{/number}","contents_url":"https://api.github.com/repos/StephanEwen/incubator-flink/contents/{+path}","compare_url":"https://api.github.com/repos/StephanEwen/incubator-flink/compare/{base}...{head}","merges_url":"https://api.github.com/repos/StephanEwen/incubator-flink/merges","archive_url":"https://api.github.com/repos/StephanEwen/incubator-flink/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/StephanEwen/incubator-flink/downloads","issues_url":"https://api.github.com/repos/StephanEwen/incubator-flink/issues{/number}","pulls_url":"https://api.github.com/repos/StephanEwen/incubator-flink/pulls{/number}","milestones_url":"https://api.github.com/repos/StephanEwen/incubator-flink/milestones{/number}","notifications_url":"https://api.github.com/repos/StephanEwen/incubator-flink/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/StephanEwen/incubator-flink/labels{/name}","releases_url":"https://api.github.com/repos/StephanEwen/incubator-flink/releases{/id}","deployments_url":"https://api.github.com/repos/StephanEwen/incubator-flink/deployments","created_at":"2014-06-24T15:57:00Z","updated_at":"2018-05-24T11:14:26Z","pushed_at":"2018-05-24T11:14:24Z","git_url":"git://github.com/StephanEwen/incubator-flink.git","ssh_url":"git@github.com:StephanEwen/incubator-flink.git","clone_url":"https://github.com/StephanEwen/incubator-flink.git","svn_url":"https://github.com/StephanEwen/incubator-flink","homepage":null,"size":154552,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":0,"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":3,"open_issues":0,"watchers":3,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"5b8396719e9f7d738cc44b53182556ae44f8ec58","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-05-24T12:01:49Z","pushed_at":"2018-05-24T12:00:10Z","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":156163,"stargazers_count":3725,"watchers_count":3725,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2534,"mirror_url":null,"archived":false,"open_issues_count":347,"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":2534,"open_issues":347,"watchers":3725,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/flink/pulls/6066"},"html":{"href":"https://github.com/apache/flink/pull/6066"},"issue":{"href":"https://api.github.com/repos/apache/flink/issues/6066"},"comments":{"href":"https://api.github.com/repos/apache/flink/issues/6066/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/flink/pulls/6066/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/flink/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/flink/pulls/6066/commits"},"statuses":{"href":"https://api.github.com/repos/apache/flink/statuses/cf1c54af0a262bbd980da7156bdafdc937ba06d4"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":false,"rebaseable":false,"mergeable_state":"dirty","merged_by":null,"comments":2,"review_comments":4,"maintainer_can_modify":false,"commits":2,"additions":238,"deletions":42,"changed_files":7}}
{"actor":{"display_login":"StephanEwen"}}