{"action":"created","issue":{"url":"https://api.github.com/repos/youtube/vitess/issues/2514","repository_url":"https://api.github.com/repos/youtube/vitess","labels_url":"https://api.github.com/repos/youtube/vitess/issues/2514/labels{/name}","comments_url":"https://api.github.com/repos/youtube/vitess/issues/2514/comments","events_url":"https://api.github.com/repos/youtube/vitess/issues/2514/events","html_url":"https://github.com/youtube/vitess/pull/2514","id":203847218,"number":2514,"title":"streaming cleanup: Phase 1","user":{"login":"sougou","id":589370,"avatar_url":"https://avatars.githubusercontent.com/u/589370?v=3","gravatar_id":"","url":"https://api.github.com/users/sougou","html_url":"https://github.com/sougou","followers_url":"https://api.github.com/users/sougou/followers","following_url":"https://api.github.com/users/sougou/following{/other_user}","gists_url":"https://api.github.com/users/sougou/gists{/gist_id}","starred_url":"https://api.github.com/users/sougou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sougou/subscriptions","organizations_url":"https://api.github.com/users/sougou/orgs","repos_url":"https://api.github.com/users/sougou/repos","events_url":"https://api.github.com/users/sougou/events{/privacy}","received_events_url":"https://api.github.com/users/sougou/received_events","type":"User","site_admin":false},"labels":[{"id":318803109,"url":"https://api.github.com/repos/youtube/vitess/labels/cla:%20yes","name":"cla: yes","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2017-01-29T03:05:02Z","updated_at":"2017-02-01T06:26:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/youtube/vitess/pulls/2514","html_url":"https://github.com/youtube/vitess/pull/2514","diff_url":"https://github.com/youtube/vitess/pull/2514.diff","patch_url":"https://github.com/youtube/vitess/pull/2514.patch"},"body":"## Part 1\r\nChange all streaming APIs to use the callback pattern uniformly.\r\nAdditionally, the shutdown sequence of the stream\r\nis now unambiguous.\r\nThe client can terminate a stream in the following ways:\r\n1. Cancel the context.\r\n2. Return io.EOF through sendReply.\r\n3. Return a different error.\r\n\r\nFor 1 & 2, the Stream function will not return an error.\r\nFor 3, the error returned for the sendReply will be returned\r\nback.\r\n\r\nOn the server side, streaming can be canceled by:\r\n1. A canceled context from anywhere in the pipeline.\r\n2. An io.EOF returned by sendReply.\r\n3. The server choosing to return nil.\r\n4. An error returned by sendReply (communication).\r\n5. The server returning an error.\r\n\r\nFor 1, 2 and  3, the client will receive no errors. For 4 & 5,\r\nthey'll receive the error returned by the server, unless the\r\nconnection was already shutdown.\r\n\r\nThis has led to some simplification so far. But the big payout\r\nwill be when tablet_conn and queryservice become the same API.\r\n\r\n## Part 2\r\nSplitQuery API consolidated.\r\n\r\n## Part 3 Monster cleanup\r\n* Consolidated QueryService and TabletConn\r\n* Introduced a Wrapper type and function that can be used to\r\n  create a new QueryService from an old one, but wrapped\r\n  by the provided function.\r\n* Created a universal ErrorQuerService type using the wrapper\r\n  and deleted the rest of the duplicates.\r\n* Removed most boiler-plating using the wrapper.\r\n* vtcombo's internal tablet conn could be partially wrapped\r\n  but I've left it alone to avoid confusion. Half those functions\r\n  can't be wrapped because they perform custom bind var copies."},"comment":{"url":"https://api.github.com/repos/youtube/vitess/issues/comments/276582794","html_url":"https://github.com/youtube/vitess/pull/2514#issuecomment-276582794","issue_url":"https://api.github.com/repos/youtube/vitess/issues/2514","id":276582794,"user":{"login":"sougou","id":589370,"avatar_url":"https://avatars.githubusercontent.com/u/589370?v=3","gravatar_id":"","url":"https://api.github.com/users/sougou","html_url":"https://github.com/sougou","followers_url":"https://api.github.com/users/sougou/followers","following_url":"https://api.github.com/users/sougou/following{/other_user}","gists_url":"https://api.github.com/users/sougou/gists{/gist_id}","starred_url":"https://api.github.com/users/sougou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sougou/subscriptions","organizations_url":"https://api.github.com/users/sougou/orgs","repos_url":"https://api.github.com/users/sougou/repos","events_url":"https://api.github.com/users/sougou/events{/privacy}","received_events_url":"https://api.github.com/users/sougou/received_events","type":"User","site_admin":false},"created_at":"2017-02-01T06:26:52Z","updated_at":"2017-02-01T06:26:52Z","body":"PTAL. I've squashed the original commits but kept the last two separate so you can review them individually."}}
{"actor":{"display_login":"sougou"}}