{"action":"created","issue":{"url":"https://api.github.com/repos/line/armeria/issues/1064","repository_url":"https://api.github.com/repos/line/armeria","labels_url":"https://api.github.com/repos/line/armeria/issues/1064/labels{/name}","comments_url":"https://api.github.com/repos/line/armeria/issues/1064/comments","events_url":"https://api.github.com/repos/line/armeria/issues/1064/events","html_url":"https://github.com/line/armeria/pull/1064","id":303368361,"number":1064,"title":"Implement flow control of gRPC stream writes.","user":{"login":"anuraaga","id":198344,"avatar_url":"https://avatars0.githubusercontent.com/u/198344?v=4","gravatar_id":"","url":"https://api.github.com/users/anuraaga","html_url":"https://github.com/anuraaga","followers_url":"https://api.github.com/users/anuraaga/followers","following_url":"https://api.github.com/users/anuraaga/following{/other_user}","gists_url":"https://api.github.com/users/anuraaga/gists{/gist_id}","starred_url":"https://api.github.com/users/anuraaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anuraaga/subscriptions","organizations_url":"https://api.github.com/users/anuraaga/orgs","repos_url":"https://api.github.com/users/anuraaga/repos","events_url":"https://api.github.com/users/anuraaga/events{/privacy}","received_events_url":"https://api.github.com/users/anuraaga/received_events","type":"User","site_admin":false},"labels":[{"id":287189526,"url":"https://api.github.com/repos/line/armeria/labels/defect","name":"defect","color":"b60205","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/line/armeria/milestones/95","html_url":"https://github.com/line/armeria/milestone/95","labels_url":"https://api.github.com/repos/line/armeria/milestones/95/labels","id":3091637,"number":95,"title":"0.59.0","description":"","creator":{"login":"trustin","id":173918,"avatar_url":"https://avatars0.githubusercontent.com/u/173918?v=4","gravatar_id":"","url":"https://api.github.com/users/trustin","html_url":"https://github.com/trustin","followers_url":"https://api.github.com/users/trustin/followers","following_url":"https://api.github.com/users/trustin/following{/other_user}","gists_url":"https://api.github.com/users/trustin/gists{/gist_id}","starred_url":"https://api.github.com/users/trustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trustin/subscriptions","organizations_url":"https://api.github.com/users/trustin/orgs","repos_url":"https://api.github.com/users/trustin/repos","events_url":"https://api.github.com/users/trustin/events{/privacy}","received_events_url":"https://api.github.com/users/trustin/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":48,"state":"open","created_at":"2018-02-06T01:52:09Z","updated_at":"2018-03-08T08:43:50Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2018-03-08T06:14:29Z","updated_at":"2018-03-08T10:38:30Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/line/armeria/pulls/1064","html_url":"https://github.com/line/armeria/pull/1064","diff_url":"https://github.com/line/armeria/pull/1064.diff","patch_url":"https://github.com/line/armeria/pull/1064.patch"},"body":"Currently, reads from the stream are correctly handled by propagating `request` through the stub, but writes are not since `isReady` is not properly implemented. When I first implemented the streams, I didn't understand `StreamWriter` properly, but now I do and realize we can use `onDemand` for this :)\r\n\r\nWith the change, the stream is only considered ready for writes when there is a request for them. I sort of want to optimize the non-backpressure case by only doing this if `isReady` is called, as that's a heuristic that should generally show the caller is implementing backpressure, but it's a bit weird and for unary calls the one call to `onDemand` doesn't seem like a big deal.\r\n\r\nFixes #1037 "},"comment":{"url":"https://api.github.com/repos/line/armeria/issues/comments/371449552","html_url":"https://github.com/line/armeria/pull/1064#issuecomment-371449552","issue_url":"https://api.github.com/repos/line/armeria/issues/1064","id":371449552,"user":{"login":"anuraaga","id":198344,"avatar_url":"https://avatars0.githubusercontent.com/u/198344?v=4","gravatar_id":"","url":"https://api.github.com/users/anuraaga","html_url":"https://github.com/anuraaga","followers_url":"https://api.github.com/users/anuraaga/followers","following_url":"https://api.github.com/users/anuraaga/following{/other_user}","gists_url":"https://api.github.com/users/anuraaga/gists{/gist_id}","starred_url":"https://api.github.com/users/anuraaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anuraaga/subscriptions","organizations_url":"https://api.github.com/users/anuraaga/orgs","repos_url":"https://api.github.com/users/anuraaga/repos","events_url":"https://api.github.com/users/anuraaga/events{/privacy}","received_events_url":"https://api.github.com/users/anuraaga/received_events","type":"User","site_admin":false},"created_at":"2018-03-08T10:38:30Z","updated_at":"2018-03-08T10:38:30Z","author_association":"COLLABORATOR","body":"Thanks for debugging this and the patch! Applied it (feel free to push straight into the branch if you ever want to though :) )\r\n\r\nToo be honest, I only half-grok why this works and the boolean didn't, and it makes the `onDemand` API seem very unintuitive. What do you think? Anyways, glad it's working though."}}
{"actor":{"display_login":"anuraaga"}}