{"action":"created","comment":{"url":"https://api.github.com/repos/m3db/m3msg/pulls/comments/180627146","pull_request_review_id":111076030,"id":180627146,"diff_hunk":"@@ -24,22 +24,13 @@ import (\n \t\"github.com/m3db/m3x/pool\"\n )\n \n-const (\n-\t// Using 16K which provides much better performance comparing\n-\t// to lower values like 1k ~ 8k.\n-\tdefaultBufferSize = 16384\n-)\n-\n // NewBaseOptions creates a new BaseOptions.\n func NewBaseOptions() BaseOptions {\n-\treturn &baseOptions{\n-\t\tbufferSize: defaultBufferSize,\n-\t}\n+\treturn &baseOptions{}\n }\n \n type baseOptions struct {\n-\tbytesPool  pool.BytesPool\n-\tbufferSize int\n+\tbytesPool pool.BytesPool","path":"protocol/proto/options.go","position":21,"original_position":21,"commit_id":"3b446f97e65d18b05f45cf9d968f2ddd16d9b553","original_commit_id":"3b446f97e65d18b05f45cf9d968f2ddd16d9b553","user":{"login":"xichen2020","id":12239421,"avatar_url":"https://avatars1.githubusercontent.com/u/12239421?v=4","gravatar_id":"","url":"https://api.github.com/users/xichen2020","html_url":"https://github.com/xichen2020","followers_url":"https://api.github.com/users/xichen2020/followers","following_url":"https://api.github.com/users/xichen2020/following{/other_user}","gists_url":"https://api.github.com/users/xichen2020/gists{/gist_id}","starred_url":"https://api.github.com/users/xichen2020/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xichen2020/subscriptions","organizations_url":"https://api.github.com/users/xichen2020/orgs","repos_url":"https://api.github.com/users/xichen2020/repos","events_url":"https://api.github.com/users/xichen2020/events{/privacy}","received_events_url":"https://api.github.com/users/xichen2020/received_events","type":"User","site_admin":false},"body":"Is this the only thing shared between encoder and decoder? if so you can probably just get rid of the base options and merge it into encoder/decoder options.","created_at":"2018-04-11T03:32:21Z","updated_at":"2018-04-11T03:33:05Z","html_url":"https://github.com/m3db/m3msg/pull/7#discussion_r180627146","pull_request_url":"https://api.github.com/repos/m3db/m3msg/pulls/7","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/m3db/m3msg/pulls/comments/180627146"},"html":{"href":"https://github.com/m3db/m3msg/pull/7#discussion_r180627146"},"pull_request":{"href":"https://api.github.com/repos/m3db/m3msg/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/m3db/m3msg/pulls/7","id":179790193,"html_url":"https://github.com/m3db/m3msg/pull/7","diff_url":"https://github.com/m3db/m3msg/pull/7.diff","patch_url":"https://github.com/m3db/m3msg/pull/7.patch","issue_url":"https://api.github.com/repos/m3db/m3msg/issues/7","number":7,"state":"open","locked":false,"title":"Add consumer writer","user":{"login":"cw9","id":6710599,"avatar_url":"https://avatars0.githubusercontent.com/u/6710599?v=4","gravatar_id":"","url":"https://api.github.com/users/cw9","html_url":"https://github.com/cw9","followers_url":"https://api.github.com/users/cw9/followers","following_url":"https://api.github.com/users/cw9/following{/other_user}","gists_url":"https://api.github.com/users/cw9/gists{/gist_id}","starred_url":"https://api.github.com/users/cw9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cw9/subscriptions","organizations_url":"https://api.github.com/users/cw9/orgs","repos_url":"https://api.github.com/users/cw9/repos","events_url":"https://api.github.com/users/cw9/events{/privacy}","received_events_url":"https://api.github.com/users/cw9/received_events","type":"User","site_admin":false},"body":"`consumerWriter` is the end part of the `producer.Writer` that manages the connection to a consumer instance.\r\n\r\nIt takes live `Write` requests to write out and constantly decodes acks from the underlying connection then delegate to `ackRouter` for acking. In this diff `ackRouter` is mocked.\r\n\r\nAll the `encode` calls need to be guarded by a encode lock and all the `decode` calls need to be guarded by a decode lock, I also need a 3rd lock to guard the access to the connection during the resetting which made the concurrency control a bit complex.\r\n\r\nThis pr also adds `Options` which provides all the options that are needed by the `Writer`, only some of them is used by `consumerWriter` here so don't worry about the unused options.\r\n\r\n@xichen2020 @jeromefroe @m-sandusky @jskelcy ","created_at":"2018-04-05T20:39:44Z","updated_at":"2018-04-11T03:33:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b6d51873508d0cd4c8ebb29319aa392bef0a4208","assignee":{"login":"jskelcy","id":2659770,"avatar_url":"https://avatars3.githubusercontent.com/u/2659770?v=4","gravatar_id":"","url":"https://api.github.com/users/jskelcy","html_url":"https://github.com/jskelcy","followers_url":"https://api.github.com/users/jskelcy/followers","following_url":"https://api.github.com/users/jskelcy/following{/other_user}","gists_url":"https://api.github.com/users/jskelcy/gists{/gist_id}","starred_url":"https://api.github.com/users/jskelcy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jskelcy/subscriptions","organizations_url":"https://api.github.com/users/jskelcy/orgs","repos_url":"https://api.github.com/users/jskelcy/repos","events_url":"https://api.github.com/users/jskelcy/events{/privacy}","received_events_url":"https://api.github.com/users/jskelcy/received_events","type":"User","site_admin":false},"assignees":[{"login":"jskelcy","id":2659770,"avatar_url":"https://avatars3.githubusercontent.com/u/2659770?v=4","gravatar_id":"","url":"https://api.github.com/users/jskelcy","html_url":"https://github.com/jskelcy","followers_url":"https://api.github.com/users/jskelcy/followers","following_url":"https://api.github.com/users/jskelcy/following{/other_user}","gists_url":"https://api.github.com/users/jskelcy/gists{/gist_id}","starred_url":"https://api.github.com/users/jskelcy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jskelcy/subscriptions","organizations_url":"https://api.github.com/users/jskelcy/orgs","repos_url":"https://api.github.com/users/jskelcy/repos","events_url":"https://api.github.com/users/jskelcy/events{/privacy}","received_events_url":"https://api.github.com/users/jskelcy/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/m3db/m3msg/pulls/7/commits","review_comments_url":"https://api.github.com/repos/m3db/m3msg/pulls/7/comments","review_comment_url":"https://api.github.com/repos/m3db/m3msg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/m3db/m3msg/issues/7/comments","statuses_url":"https://api.github.com/repos/m3db/m3msg/statuses/3b446f97e65d18b05f45cf9d968f2ddd16d9b553","head":{"label":"m3db:chao-writer1","ref":"chao-writer1","sha":"3b446f97e65d18b05f45cf9d968f2ddd16d9b553","user":{"login":"m3db","id":19937171,"avatar_url":"https://avatars0.githubusercontent.com/u/19937171?v=4","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"repo":{"id":126348256,"name":"m3msg","full_name":"m3db/m3msg","owner":{"login":"m3db","id":19937171,"avatar_url":"https://avatars0.githubusercontent.com/u/19937171?v=4","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/m3db/m3msg","description":null,"fork":false,"url":"https://api.github.com/repos/m3db/m3msg","forks_url":"https://api.github.com/repos/m3db/m3msg/forks","keys_url":"https://api.github.com/repos/m3db/m3msg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m3db/m3msg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m3db/m3msg/teams","hooks_url":"https://api.github.com/repos/m3db/m3msg/hooks","issue_events_url":"https://api.github.com/repos/m3db/m3msg/issues/events{/number}","events_url":"https://api.github.com/repos/m3db/m3msg/events","assignees_url":"https://api.github.com/repos/m3db/m3msg/assignees{/user}","branches_url":"https://api.github.com/repos/m3db/m3msg/branches{/branch}","tags_url":"https://api.github.com/repos/m3db/m3msg/tags","blobs_url":"https://api.github.com/repos/m3db/m3msg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m3db/m3msg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m3db/m3msg/git/refs{/sha}","trees_url":"https://api.github.com/repos/m3db/m3msg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m3db/m3msg/statuses/{sha}","languages_url":"https://api.github.com/repos/m3db/m3msg/languages","stargazers_url":"https://api.github.com/repos/m3db/m3msg/stargazers","contributors_url":"https://api.github.com/repos/m3db/m3msg/contributors","subscribers_url":"https://api.github.com/repos/m3db/m3msg/subscribers","subscription_url":"https://api.github.com/repos/m3db/m3msg/subscription","commits_url":"https://api.github.com/repos/m3db/m3msg/commits{/sha}","git_commits_url":"https://api.github.com/repos/m3db/m3msg/git/commits{/sha}","comments_url":"https://api.github.com/repos/m3db/m3msg/comments{/number}","issue_comment_url":"https://api.github.com/repos/m3db/m3msg/issues/comments{/number}","contents_url":"https://api.github.com/repos/m3db/m3msg/contents/{+path}","compare_url":"https://api.github.com/repos/m3db/m3msg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m3db/m3msg/merges","archive_url":"https://api.github.com/repos/m3db/m3msg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m3db/m3msg/downloads","issues_url":"https://api.github.com/repos/m3db/m3msg/issues{/number}","pulls_url":"https://api.github.com/repos/m3db/m3msg/pulls{/number}","milestones_url":"https://api.github.com/repos/m3db/m3msg/milestones{/number}","notifications_url":"https://api.github.com/repos/m3db/m3msg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m3db/m3msg/labels{/name}","releases_url":"https://api.github.com/repos/m3db/m3msg/releases{/id}","deployments_url":"https://api.github.com/repos/m3db/m3msg/deployments","created_at":"2018-03-22T14:32:21Z","updated_at":"2018-04-05T18:34:51Z","pushed_at":"2018-04-10T16:03:22Z","git_url":"git://github.com/m3db/m3msg.git","ssh_url":"git@github.com:m3db/m3msg.git","clone_url":"https://github.com/m3db/m3msg.git","svn_url":"https://github.com/m3db/m3msg","homepage":null,"size":109,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"m3db:master","ref":"master","sha":"04e3a6eae403f51d45e9c250b73a6f2f3a3f1a96","user":{"login":"m3db","id":19937171,"avatar_url":"https://avatars0.githubusercontent.com/u/19937171?v=4","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"repo":{"id":126348256,"name":"m3msg","full_name":"m3db/m3msg","owner":{"login":"m3db","id":19937171,"avatar_url":"https://avatars0.githubusercontent.com/u/19937171?v=4","gravatar_id":"","url":"https://api.github.com/users/m3db","html_url":"https://github.com/m3db","followers_url":"https://api.github.com/users/m3db/followers","following_url":"https://api.github.com/users/m3db/following{/other_user}","gists_url":"https://api.github.com/users/m3db/gists{/gist_id}","starred_url":"https://api.github.com/users/m3db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m3db/subscriptions","organizations_url":"https://api.github.com/users/m3db/orgs","repos_url":"https://api.github.com/users/m3db/repos","events_url":"https://api.github.com/users/m3db/events{/privacy}","received_events_url":"https://api.github.com/users/m3db/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/m3db/m3msg","description":null,"fork":false,"url":"https://api.github.com/repos/m3db/m3msg","forks_url":"https://api.github.com/repos/m3db/m3msg/forks","keys_url":"https://api.github.com/repos/m3db/m3msg/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m3db/m3msg/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m3db/m3msg/teams","hooks_url":"https://api.github.com/repos/m3db/m3msg/hooks","issue_events_url":"https://api.github.com/repos/m3db/m3msg/issues/events{/number}","events_url":"https://api.github.com/repos/m3db/m3msg/events","assignees_url":"https://api.github.com/repos/m3db/m3msg/assignees{/user}","branches_url":"https://api.github.com/repos/m3db/m3msg/branches{/branch}","tags_url":"https://api.github.com/repos/m3db/m3msg/tags","blobs_url":"https://api.github.com/repos/m3db/m3msg/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m3db/m3msg/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m3db/m3msg/git/refs{/sha}","trees_url":"https://api.github.com/repos/m3db/m3msg/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m3db/m3msg/statuses/{sha}","languages_url":"https://api.github.com/repos/m3db/m3msg/languages","stargazers_url":"https://api.github.com/repos/m3db/m3msg/stargazers","contributors_url":"https://api.github.com/repos/m3db/m3msg/contributors","subscribers_url":"https://api.github.com/repos/m3db/m3msg/subscribers","subscription_url":"https://api.github.com/repos/m3db/m3msg/subscription","commits_url":"https://api.github.com/repos/m3db/m3msg/commits{/sha}","git_commits_url":"https://api.github.com/repos/m3db/m3msg/git/commits{/sha}","comments_url":"https://api.github.com/repos/m3db/m3msg/comments{/number}","issue_comment_url":"https://api.github.com/repos/m3db/m3msg/issues/comments{/number}","contents_url":"https://api.github.com/repos/m3db/m3msg/contents/{+path}","compare_url":"https://api.github.com/repos/m3db/m3msg/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m3db/m3msg/merges","archive_url":"https://api.github.com/repos/m3db/m3msg/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m3db/m3msg/downloads","issues_url":"https://api.github.com/repos/m3db/m3msg/issues{/number}","pulls_url":"https://api.github.com/repos/m3db/m3msg/pulls{/number}","milestones_url":"https://api.github.com/repos/m3db/m3msg/milestones{/number}","notifications_url":"https://api.github.com/repos/m3db/m3msg/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m3db/m3msg/labels{/name}","releases_url":"https://api.github.com/repos/m3db/m3msg/releases{/id}","deployments_url":"https://api.github.com/repos/m3db/m3msg/deployments","created_at":"2018-03-22T14:32:21Z","updated_at":"2018-04-05T18:34:51Z","pushed_at":"2018-04-10T16:03:22Z","git_url":"git://github.com/m3db/m3msg.git","ssh_url":"git@github.com:m3db/m3msg.git","clone_url":"https://github.com/m3db/m3msg.git","svn_url":"https://github.com/m3db/m3msg","homepage":null,"size":109,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/m3db/m3msg/pulls/7"},"html":{"href":"https://github.com/m3db/m3msg/pull/7"},"issue":{"href":"https://api.github.com/repos/m3db/m3msg/issues/7"},"comments":{"href":"https://api.github.com/repos/m3db/m3msg/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/m3db/m3msg/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/m3db/m3msg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/m3db/m3msg/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/m3db/m3msg/statuses/3b446f97e65d18b05f45cf9d968f2ddd16d9b553"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"xichen2020"}}