{"action":"created","issue":{"url":"https://api.github.com/repos/crate/crate/issues/4903","repository_url":"https://api.github.com/repos/crate/crate","labels_url":"https://api.github.com/repos/crate/crate/issues/4903/labels{/name}","comments_url":"https://api.github.com/repos/crate/crate/issues/4903/comments","events_url":"https://api.github.com/repos/crate/crate/issues/4903/events","html_url":"https://github.com/crate/crate/pull/4903","id":207533460,"number":4903,"title":"Make all RowReceiver's listenable","user":{"login":"mfussenegger","id":38700,"avatar_url":"https://avatars.githubusercontent.com/u/38700?v=3","gravatar_id":"","url":"https://api.github.com/users/mfussenegger","html_url":"https://github.com/mfussenegger","followers_url":"https://api.github.com/users/mfussenegger/followers","following_url":"https://api.github.com/users/mfussenegger/following{/other_user}","gists_url":"https://api.github.com/users/mfussenegger/gists{/gist_id}","starred_url":"https://api.github.com/users/mfussenegger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfussenegger/subscriptions","organizations_url":"https://api.github.com/users/mfussenegger/orgs","repos_url":"https://api.github.com/users/mfussenegger/repos","events_url":"https://api.github.com/users/mfussenegger/events{/privacy}","received_events_url":"https://api.github.com/users/mfussenegger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-14T14:39:46Z","updated_at":"2017-02-14T20:13:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/crate/crate/pulls/4903","html_url":"https://github.com/crate/crate/pull/4903","diff_url":"https://github.com/crate/crate/pull/4903.diff","patch_url":"https://github.com/crate/crate/pull/4903.patch"},"body":"In order to migrate to a pull-based execution pipeline we'll temporarly\nrequire a bridge from pull to push (to RowReceiver).\n\nIn a pull based architecture a consumer needs to explicitly close its\nupstream to release its resources. A upstream/data-source cannot\nauto-close itself as it doesn't know when a consumer has finished.\nSo we'll need to have some kind of `close` method.\n\nTo slowly migrate individual components we'll require a\nRowReceiver-bridge. This bridge needs to call `close` after the\nRowReceiver is done. This commit adds a `finishFuture` that can be used\nby the bridge. Otherwise it wouldn't know when a RowReceiver is really\n\"done\" due to their async nature.\n\nOther rejected approaches:\n\n- Adding `close` to the RepeatHandle.:\n\nThis doesn't work for cases where a intermediate failure happens because\nthe RepeatHandle won't be available and so a RowReceiver further down\nthe chain cannot call close.\n\n- Merge `finish` and `fail` and add a `closeCallback`:\n\nThis would work, but is more complicated because all async RowReceivers\nwould have to manage additional futures in order to be able to handover\nthe `closeCallback` to its downstream.\n\n- Change `finish/fail` to return a Future:\n\nThis would also require intermediate futures in async RowReceivers as\nthe `finish/fail` calls cannot be called eagerly to pass-through the\nfuture."},"comment":{"url":"https://api.github.com/repos/crate/crate/issues/comments/279822148","html_url":"https://github.com/crate/crate/pull/4903#issuecomment-279822148","issue_url":"https://api.github.com/repos/crate/crate/issues/4903","id":279822148,"user":{"login":"dobe","id":48020,"avatar_url":"https://avatars.githubusercontent.com/u/48020?v=3","gravatar_id":"","url":"https://api.github.com/users/dobe","html_url":"https://github.com/dobe","followers_url":"https://api.github.com/users/dobe/followers","following_url":"https://api.github.com/users/dobe/following{/other_user}","gists_url":"https://api.github.com/users/dobe/gists{/gist_id}","starred_url":"https://api.github.com/users/dobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dobe/subscriptions","organizations_url":"https://api.github.com/users/dobe/orgs","repos_url":"https://api.github.com/users/dobe/repos","events_url":"https://api.github.com/users/dobe/events{/privacy}","received_events_url":"https://api.github.com/users/dobe/received_events","type":"User","site_admin":false},"created_at":"2017-02-14T20:13:39Z","updated_at":"2017-02-14T20:13:39Z","body":"@mfussenegger did you consider let RowReceiver implement CompletionListenable? does it conflict in existing components?"}}
{"actor":{"display_login":"dobe"}}