payload: {"action":"created","comment":{"url":"https://api.github.com/repos/XiaoMi/pegasus/pulls/comments/314713274","pull_request_review_id":275940798,"id":314713274,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMxNDcxMzI3NA==","diff_hunk":"@@ -84,9 +80,13 @@ class redis_parser : public proxy_session\n \n     struct redis_request\n     {\n-        int length;\n-        std::vector<redis_bulk_string> buffers;\n-        redis_request() : length(0), buffers() {}\n+        int sub_request_count = 0;\n+        std::vector<redis_bulk_string> sub_requests;\n+\n+        redis_request(int count = 0, std::vector<redis_bulk_string> requests = {})","path":"src/redis_protocol/proxy_lib/redis_parser.h","position":57,"original_position":57,"commit_id":"a76fafd832c97a531e23b7605c1fc6c5f46894fd","original_commit_id":"0a32e083176d3a99f9ba3a18532cecd9bd6e290b","user":{"login":"acelyc111","id":10775040,"node_id":"MDQ6VXNlcjEwNzc1MDQw","avatar_url":"https://avatars1.githubusercontent.com/u/10775040?v=4","gravatar_id":"","url":"https://api.github.com/users/acelyc111","html_url":"https://github.com/acelyc111","followers_url":"https://api.github.com/users/acelyc111/followers","following_url":"https://api.github.com/users/acelyc111/following{/other_user}","gists_url":"https://api.github.com/users/acelyc111/gists{/gist_id}","starred_url":"https://api.github.com/users/acelyc111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acelyc111/subscriptions","organizations_url":"https://api.github.com/users/acelyc111/orgs","repos_url":"https://api.github.com/users/acelyc111/repos","events_url":"https://api.github.com/users/acelyc111/events{/privacy}","received_events_url":"https://api.github.com/users/acelyc111/received_events","type":"User","site_admin":false},"body":"只有一个const &的话，就至少会有一次copy了。\r\n但如果像这样实现， 那么在调用时可以使用`redis_request(n std::move(some_object))`来减少一次copy","created_at":"2019-08-16T13:11:44Z","updated_at":"2019-08-16T13:11:44Z","html_url":"https://github.com/XiaoMi/pegasus/pull/378#discussion_r314713274","pull_request_url":"https://api.github.com/repos/XiaoMi/pegasus/pulls/378","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/XiaoMi/pegasus/pulls/comments/314713274"},"html":{"href":"https://github.com/XiaoMi/pegasus/pull/378#discussion_r314713274"},"pull_request":{"href":"https://api.github.com/repos/XiaoMi/pegasus/pulls/378"}},"in_reply_to_id":314566080},"pull_request":{"url":"https://api.github.com/repos/XiaoMi/pegasus/pulls/378","id":307574250,"node_id":"MDExOlB1bGxSZXF1ZXN0MzA3NTc0MjUw","html_url":"https://github.com/XiaoMi/pegasus/pull/378","diff_url":"https://github.com/XiaoMi/pegasus/pull/378.diff","patch_url":"https://github.com/XiaoMi/pegasus/pull/378.patch","issue_url":"https://api.github.com/repos/XiaoMi/pegasus/issues/378","number":378,"state":"open","locked":false,"title":"proxy: do some refactor","user":{"login":"acelyc111","id":10775040,"node_id":"MDQ6VXNlcjEwNzc1MDQw","avatar_url":"https://avatars1.githubusercontent.com/u/10775040?v=4","gravatar_id":"","url":"https://api.github.com/users/acelyc111","html_url":"https://github.com/acelyc111","followers_url":"https://api.github.com/users/acelyc111/followers","following_url":"https://api.github.com/users/acelyc111/following{/other_user}","gists_url":"https://api.github.com/users/acelyc111/gists{/gist_id}","starred_url":"https://api.github.com/users/acelyc111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acelyc111/subscriptions","organizations_url":"https://api.github.com/users/acelyc111/orgs","repos_url":"https://api.github.com/users/acelyc111/repos","events_url":"https://api.github.com/users/acelyc111/events{/privacy}","received_events_url":"https://api.github.com/users/acelyc111/received_events","type":"User","site_admin":false},"body":"### What problem does this PR solve? \r\nno functional modifies, just refactor\r\n\r\n### What is changed and how it works?\r\nno functional modified\r\n\r\n### Check List\r\n\r\nTests\r\n\r\n- Unit test\r\n- Integration test\r\n- Manual test (add detailed scripts or steps below)\r\n- No code\r\n\r\nCode changes\r\n\r\n- Has exported function/method change\r\nno\r\n- Has exported variable/fields change\r\nno\r\n- Has interface methods change\r\nno\r\n- Has persistent data change\r\nno\r\n\r\nSide effects\r\n\r\n- Possible performance regression\r\nno\r\n- Increased code complexity\r\nno\r\n- Breaking backward compatibility\r\nno\r\n\r\nRelated changes\r\n\r\n- Need to cherry-pick to the release branch\r\nyes\r\n- Need to update the documentation\r\nno\r\n- Need to be included in the release note\r\nno","created_at":"2019-08-15T04:06:07Z","updated_at":"2019-08-16T13:11:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b0ad6ab9bfe23a0237304c7c5ef362249474ff4f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/XiaoMi/pegasus/pulls/378/commits","review_comments_url":"https://api.github.com/repos/XiaoMi/pegasus/pulls/378/comments","review_comment_url":"https://api.github.com/repos/XiaoMi/pegasus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/XiaoMi/pegasus/issues/378/comments","statuses_url":"https://api.github.com/repos/XiaoMi/pegasus/statuses/a76fafd832c97a531e23b7605c1fc6c5f46894fd","head":{"label":"acelyc111:redis_refactor","ref":"redis_refactor","sha":"a76fafd832c97a531e23b7605c1fc6c5f46894fd","user":{"login":"acelyc111","id":10775040,"node_id":"MDQ6VXNlcjEwNzc1MDQw","avatar_url":"https://avatars1.githubusercontent.com/u/10775040?v=4","gravatar_id":"","url":"https://api.github.com/users/acelyc111","html_url":"https://github.com/acelyc111","followers_url":"https://api.github.com/users/acelyc111/followers","following_url":"https://api.github.com/users/acelyc111/following{/other_user}","gists_url":"https://api.github.com/users/acelyc111/gists{/gist_id}","starred_url":"https://api.github.com/users/acelyc111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acelyc111/subscriptions","organizations_url":"https://api.github.com/users/acelyc111/orgs","repos_url":"https://api.github.com/users/acelyc111/repos","events_url":"https://api.github.com/users/acelyc111/events{/privacy}","received_events_url":"https://api.github.com/users/acelyc111/received_events","type":"User","site_admin":false},"repo":{"id":111100635,"node_id":"MDEwOlJlcG9zaXRvcnkxMTExMDA2MzU=","name":"pegasus","full_name":"acelyc111/pegasus","private":false,"owner":{"login":"acelyc111","id":10775040,"node_id":"MDQ6VXNlcjEwNzc1MDQw","avatar_url":"https://avatars1.githubusercontent.com/u/10775040?v=4","gravatar_id":"","url":"https://api.github.com/users/acelyc111","html_url":"https://github.com/acelyc111","followers_url":"https://api.github.com/users/acelyc111/followers","following_url":"https://api.github.com/users/acelyc111/following{/other_user}","gists_url":"https://api.github.com/users/acelyc111/gists{/gist_id}","starred_url":"https://api.github.com/users/acelyc111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acelyc111/subscriptions","organizations_url":"https://api.github.com/users/acelyc111/orgs","repos_url":"https://api.github.com/users/acelyc111/repos","events_url":"https://api.github.com/users/acelyc111/events{/privacy}","received_events_url":"https://api.github.com/users/acelyc111/received_events","type":"User","site_admin":false},"html_url":"https://github.com/acelyc111/pegasus","description":null,"fork":true,"url":"https://api.github.com/repos/acelyc111/pegasus","forks_url":"https://api.github.com/repos/acelyc111/pegasus/forks","keys_url":"https://api.github.com/repos/acelyc111/pegasus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acelyc111/pegasus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acelyc111/pegasus/teams","hooks_url":"https://api.github.com/repos/acelyc111/pegasus/hooks","issue_events_url":"https://api.github.com/repos/acelyc111/pegasus/issues/events{/number}","events_url":"https://api.github.com/repos/acelyc111/pegasus/events","assignees_url":"https://api.github.com/repos/acelyc111/pegasus/assignees{/user}","branches_url":"https://api.github.com/repos/acelyc111/pegasus/branches{/branch}","tags_url":"https://api.github.com/repos/acelyc111/pegasus/tags","blobs_url":"https://api.github.com/repos/acelyc111/pegasus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acelyc111/pegasus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acelyc111/pegasus/git/refs{/sha}","trees_url":"https://api.github.com/repos/acelyc111/pegasus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acelyc111/pegasus/statuses/{sha}","languages_url":"https://api.github.com/repos/acelyc111/pegasus/languages","stargazers_url":"https://api.github.com/repos/acelyc111/pegasus/stargazers","contributors_url":"https://api.github.com/repos/acelyc111/pegasus/contributors","subscribers_url":"https://api.github.com/repos/acelyc111/pegasus/subscribers","subscription_url":"https://api.github.com/repos/acelyc111/pegasus/subscription","commits_url":"https://api.github.com/repos/acelyc111/pegasus/commits{/sha}","git_commits_url":"https://api.github.com/repos/acelyc111/pegasus/git/commits{/sha}","comments_url":"https://api.github.com/repos/acelyc111/pegasus/comments{/number}","issue_comment_url":"https://api.github.com/repos/acelyc111/pegasus/issues/comments{/number}","contents_url":"https://api.github.com/repos/acelyc111/pegasus/contents/{+path}","compare_url":"https://api.github.com/repos/acelyc111/pegasus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acelyc111/pegasus/merges","archive_url":"https://api.github.com/repos/acelyc111/pegasus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acelyc111/pegasus/downloads","issues_url":"https://api.github.com/repos/acelyc111/pegasus/issues{/number}","pulls_url":"https://api.github.com/repos/acelyc111/pegasus/pulls{/number}","milestones_url":"https://api.github.com/repos/acelyc111/pegasus/milestones{/number}","notifications_url":"https://api.github.com/repos/acelyc111/pegasus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acelyc111/pegasus/labels{/name}","releases_url":"https://api.github.com/repos/acelyc111/pegasus/releases{/id}","deployments_url":"https://api.github.com/repos/acelyc111/pegasus/deployments","created_at":"2017-11-17T12:22:52Z","updated_at":"2019-08-15T03:31:39Z","pushed_at":"2019-08-16T08:08:28Z","git_url":"git://github.com/acelyc111/pegasus.git","ssh_url":"git@github.com:acelyc111/pegasus.git","clone_url":"https://github.com/acelyc111/pegasus.git","svn_url":"https://github.com/acelyc111/pegasus","homepage":null,"size":32565,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":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","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"XiaoMi:master","ref":"master","sha":"a251fc72c004d9fd401bf7cc7ec22c02070394f7","user":{"login":"XiaoMi","id":1309360,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMDkzNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/1309360?v=4","gravatar_id":"","url":"https://api.github.com/users/XiaoMi","html_url":"https://github.com/XiaoMi","followers_url":"https://api.github.com/users/XiaoMi/followers","following_url":"https://api.github.com/users/XiaoMi/following{/other_user}","gists_url":"https://api.github.com/users/XiaoMi/gists{/gist_id}","starred_url":"https://api.github.com/users/XiaoMi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XiaoMi/subscriptions","organizations_url":"https://api.github.com/users/XiaoMi/orgs","repos_url":"https://api.github.com/users/XiaoMi/repos","events_url":"https://api.github.com/users/XiaoMi/events{/privacy}","received_events_url":"https://api.github.com/users/XiaoMi/received_events","type":"Organization","site_admin":false},"repo":{"id":41712332,"node_id":"MDEwOlJlcG9zaXRvcnk0MTcxMjMzMg==","name":"pegasus","full_name":"XiaoMi/pegasus","private":false,"owner":{"login":"XiaoMi","id":1309360,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMDkzNjA=","avatar_url":"https://avatars3.githubusercontent.com/u/1309360?v=4","gravatar_id":"","url":"https://api.github.com/users/XiaoMi","html_url":"https://github.com/XiaoMi","followers_url":"https://api.github.com/users/XiaoMi/followers","following_url":"https://api.github.com/users/XiaoMi/following{/other_user}","gists_url":"https://api.github.com/users/XiaoMi/gists{/gist_id}","starred_url":"https://api.github.com/users/XiaoMi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/XiaoMi/subscriptions","organizations_url":"https://api.github.com/users/XiaoMi/orgs","repos_url":"https://api.github.com/users/XiaoMi/repos","events_url":"https://api.github.com/users/XiaoMi/events{/privacy}","received_events_url":"https://api.github.com/users/XiaoMi/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/XiaoMi/pegasus","description":"A distributed key-value storage system developed and maintained by Xiaomi Cloud Storage Team.","fork":false,"url":"https://api.github.com/repos/XiaoMi/pegasus","forks_url":"https://api.github.com/repos/XiaoMi/pegasus/forks","keys_url":"https://api.github.com/repos/XiaoMi/pegasus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/XiaoMi/pegasus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/XiaoMi/pegasus/teams","hooks_url":"https://api.github.com/repos/XiaoMi/pegasus/hooks","issue_events_url":"https://api.github.com/repos/XiaoMi/pegasus/issues/events{/number}","events_url":"https://api.github.com/repos/XiaoMi/pegasus/events","assignees_url":"https://api.github.com/repos/XiaoMi/pegasus/assignees{/user}","branches_url":"https://api.github.com/repos/XiaoMi/pegasus/branches{/branch}","tags_url":"https://api.github.com/repos/XiaoMi/pegasus/tags","blobs_url":"https://api.github.com/repos/XiaoMi/pegasus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/XiaoMi/pegasus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/XiaoMi/pegasus/git/refs{/sha}","trees_url":"https://api.github.com/repos/XiaoMi/pegasus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/XiaoMi/pegasus/statuses/{sha}","languages_url":"https://api.github.com/repos/XiaoMi/pegasus/languages","stargazers_url":"https://api.github.com/repos/XiaoMi/pegasus/stargazers","contributors_url":"https://api.github.com/repos/XiaoMi/pegasus/contributors","subscribers_url":"https://api.github.com/repos/XiaoMi/pegasus/subscribers","subscription_url":"https://api.github.com/repos/XiaoMi/pegasus/subscription","commits_url":"https://api.github.com/repos/XiaoMi/pegasus/commits{/sha}","git_commits_url":"https://api.github.com/repos/XiaoMi/pegasus/git/commits{/sha}","comments_url":"https://api.github.com/repos/XiaoMi/pegasus/comments{/number}","issue_comment_url":"https://api.github.com/repos/XiaoMi/pegasus/issues/comments{/number}","contents_url":"https://api.github.com/repos/XiaoMi/pegasus/contents/{+path}","compare_url":"https://api.github.com/repos/XiaoMi/pegasus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/XiaoMi/pegasus/merges","archive_url":"https://api.github.com/repos/XiaoMi/pegasus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/XiaoMi/pegasus/downloads","issues_url":"https://api.github.com/repos/XiaoMi/pegasus/issues{/number}","pulls_url":"https://api.github.com/repos/XiaoMi/pegasus/pulls{/number}","milestones_url":"https://api.github.com/repos/XiaoMi/pegasus/milestones{/number}","notifications_url":"https://api.github.com/repos/XiaoMi/pegasus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/XiaoMi/pegasus/labels{/name}","releases_url":"https://api.github.com/repos/XiaoMi/pegasus/releases{/id}","deployments_url":"https://api.github.com/repos/XiaoMi/pegasus/deployments","created_at":"2015-09-01T02:29:37Z","updated_at":"2019-08-16T08:01:34Z","pushed_at":"2019-08-16T11:27:15Z","git_url":"git://github.com/XiaoMi/pegasus.git","ssh_url":"git@github.com:XiaoMi/pegasus.git","clone_url":"https://github.com/XiaoMi/pegasus.git","svn_url":"https://github.com/XiaoMi/pegasus","homepage":"https://pegasus-kv.github.io/","size":32415,"stargazers_count":1079,"watchers_count":1079,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":198,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":66,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":198,"open_issues":66,"watchers":1079,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/XiaoMi/pegasus/pulls/378"},"html":{"href":"https://github.com/XiaoMi/pegasus/pull/378"},"issue":{"href":"https://api.github.com/repos/XiaoMi/pegasus/issues/378"},"comments":{"href":"https://api.github.com/repos/XiaoMi/pegasus/issues/378/comments"},"review_comments":{"href":"https://api.github.com/repos/XiaoMi/pegasus/pulls/378/comments"},"review_comment":{"href":"https://api.github.com/repos/XiaoMi/pegasus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/XiaoMi/pegasus/pulls/378/commits"},"statuses":{"href":"https://api.github.com/repos/XiaoMi/pegasus/statuses/a76fafd832c97a531e23b7605c1fc6c5f46894fd"}},"author_association":"MEMBER"}}
other: {"actor":{"display_login":"acelyc111"}}