{"action":"created","comment":{"url":"https://api.github.com/repos/m3db/m3msg/pulls/comments/183092825","pull_request_review_id":114026457,"id":183092825,"diff_hunk":"@@ -0,0 +1,258 @@\n+// Copyright (c) 2018 Uber Technologies, Inc.\n+//\n+// Permission is hereby granted, free of charge, to any person obtaining a copy\n+// of this software and associated documentation files (the \"Software\"), to deal\n+// in the Software without restriction, including without limitation the rights\n+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+// copies of the Software, and to permit persons to whom the Software is\n+// furnished to do so, subject to the following conditions:\n+//\n+// The above copyright notice and this permission notice shall be included in\n+// all copies or substantial portions of the Software.\n+//\n+// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+// THE SOFTWARE.\n+\n+package writer\n+\n+import (\n+\t\"errors\"\n+\t\"fmt\"\n+\t\"sync\"\n+\n+\t\"github.com/m3db/m3cluster/services\"\n+\t\"github.com/m3db/m3msg/producer\"\n+\t\"github.com/m3db/m3msg/topic\"\n+\txerrors \"github.com/m3db/m3x/errors\"\n+\t\"github.com/m3db/m3x/log\"\n+\t\"github.com/m3db/m3x/watch\"\n+\n+\t\"github.com/uber-go/tally\"\n+)\n+\n+var (\n+\terrWriterClosed = errors.New(\"writer is closed\")\n+)\n+\n+type writerMetrics struct {\n+\ttopicUpdateSuccess  tally.Counter\n+\ttopicUpdateError    tally.Counter\n+\tinvalidTopicUpdate  tally.Counter\n+\tinvalidShard        tally.Counter\n+\tnumConsumerServices tally.Gauge\n+}\n+\n+func newWriterMetrics(scope tally.Scope) writerMetrics {\n+\treturn writerMetrics{\n+\t\ttopicUpdateSuccess:  scope.Counter(\"topic-update-success\"),\n+\t\ttopicUpdateError:    scope.Counter(\"topic-update-error\"),\n+\t\tinvalidTopicUpdate:  scope.Counter(\"invalid-topic\"),\n+\t\tinvalidShard:        scope.Counter(\"invalid-shard\"),\n+\t\tnumConsumerServices: scope.Gauge(\"num-consumer-services\"),\n+\t}\n+}\n+\n+type writer struct {\n+\tsync.RWMutex\n+\n+\ttopic  string\n+\tts     topic.Service\n+\tmPool  messagePool\n+\topts   Options\n+\tlogger log.Logger\n+\n+\tvalue                  watch.Value\n+\tinitType               initType\n+\tnumShards              uint32\n+\tconsumerServiceWriters map[string]consumerServiceWriter\n+\tfilterRegistry         map[string]producer.FilterFunc\n+\tisClosed               bool\n+\tm                      writerMetrics\n+\n+\tprocessFn watch.ProcessFn\n+}\n+\n+// NewWriter creates a new writer.\n+func NewWriter(opts Options) producer.Writer {\n+\tw := &writer{\n+\t\ttopic:                  opts.TopicName(),\n+\t\tts:                     opts.TopicService(),\n+\t\tmPool:                  newMessagePool(opts.MessagePoolOptions()),\n+\t\topts:                   opts,\n+\t\tlogger:                 opts.InstrumentOptions().Logger(),\n+\t\tinitType:               failOnError,\n+\t\tconsumerServiceWriters: make(map[string]consumerServiceWriter),\n+\t\tfilterRegistry:         make(map[string]producer.FilterFunc),\n+\t\tisClosed:               false,\n+\t\tm:                      newWriterMetrics(opts.InstrumentOptions().MetricsScope()),\n+\t}\n+\tw.processFn = w.process\n+\treturn w\n+}\n+\n+func (w *writer) Write(d producer.RefCountedData) error {\n+\tw.RLock()\n+\tisClosed := w.isClosed\n+\tm := w.consumerServiceWriters\n+\tnumShards := w.numShards\n+\tw.RUnlock()\n+\tif isClosed {\n+\t\td.Drop()\n+\t\treturn errWriterClosed\n+\t}\n+\tshard := d.Shard()\n+\tif shard >= numShards {\n+\t\tw.m.invalidShard.Inc(1)\n+\t\td.Drop()\n+\t\treturn fmt.Errorf(\"could not write data for shard %d which is larger than max shard id %d\", shard, numShards-1)\n+\t}\n+\t// NB(cw): Need to inc ref here in case a consumer service\n+\t// writes the data too fast and close the data.\n+\td.IncRef()\n+\tfor _, csw := range m {\n+\t\tcsw.Write(d)\n+\t}\n+\td.DecRef()\n+\treturn nil\n+}\n+\n+func (w *writer) Init() error {\n+\tw.mPool.Init()\n+\tnewUpdatableFn := func() (watch.Updatable, error) {\n+\t\treturn w.ts.Watch(w.topic)\n+\t}\n+\tgetUpdateFn := func(value watch.Updatable) (interface{}, error) {\n+\t\tt, err := value.(topic.Watch).Get()\n+\t\tif err != nil {\n+\t\t\tw.m.invalidTopicUpdate.Inc(1)\n+\t\t\treturn nil, err\n+\t\t}\n+\t\treturn t, nil\n+\t}\n+\tvOptions := watch.NewOptions().\n+\t\tSetInitWatchTimeout(w.opts.PlacementWatchInitTimeout()).\n+\t\tSetInstrumentOptions(w.opts.InstrumentOptions()).\n+\t\tSetNewUpdatableFn(newUpdatableFn).\n+\t\tSetGetUpdateFn(getUpdateFn).\n+\t\tSetProcessFn(w.processFn)\n+\tw.value = watch.NewValue(vOptions)\n+\treturn w.value.Watch()\n+}\n+\n+func (w *writer) process(update interface{}) error {\n+\tt := update.(topic.Topic)\n+\t// We don't allow changing number of shards for topics, it will be\n+\t// prevented on topic service side, but also being defensive here as well.\n+\tif w.numShards != 0 && w.numShards != t.NumberOfShards() {\n+\t\tw.m.topicUpdateError.Inc(1)\n+\t\treturn fmt.Errorf(\"invalid topic update with %d shards, expecting %d\", t.NumberOfShards(), w.numShards)\n+\t}\n+\tvar (\n+\t\tiOpts                     = w.opts.InstrumentOptions()\n+\t\tnewConsumerServiceWriters = make(map[string]consumerServiceWriter, len(t.ConsumerServices()))\n+\t\ttoBeClosed                []consumerServiceWriter\n+\t\tmultiErr                  xerrors.MultiError\n+\t)\n+\tfor _, cs := range t.ConsumerServices() {\n+\t\tkey := cs.ServiceID().String()\n+\t\tcsw, ok := w.consumerServiceWriters[key]\n+\t\tif ok {\n+\t\t\tnewConsumerServiceWriters[key] = csw\n+\t\t\tcontinue\n+\t\t}\n+\t\tscope := iOpts.MetricsScope().Tagged(map[string]string{\n+\t\t\t\"consumer-service-name\": cs.ServiceID().Name(),\n+\t\t\t\"consumer-service-zone\": cs.ServiceID().Zone(),\n+\t\t\t\"consumer-service-env\":  cs.ServiceID().Environment(),\n+\t\t\t\"consumption-type\":      cs.ConsumptionType().String(),\n+\t\t})\n+\t\tcsw, err := newConsumerServiceWriter(cs, t.NumberOfShards(), w.mPool, w.opts.SetInstrumentOptions(iOpts.SetMetricsScope(scope)))\n+\t\tif err != nil {\n+\t\t\tw.logger.Errorf(\"could not create consumer service writer for %s: %v\", cs.String(), err)\n+\t\t\tmultiErr = multiErr.Add(err)\n+\t\t\tcontinue\n+\t\t}\n+\t\tif err = csw.Init(w.initType); err != nil {\n+\t\t\tw.logger.Errorf(\"could not init consumer service writer for %s: %v\", cs.String(), err)\n+\t\t\tmultiErr = multiErr.Add(err)\n+\t\t\tcsw.Close()\n+\t\t\tcontinue\n+\t\t}\n+\t\tnewConsumerServiceWriters[key] = csw\n+\t}\n+\tfor key, csw := range w.consumerServiceWriters {\n+\t\tif _, ok := newConsumerServiceWriters[key]; !ok {\n+\t\t\ttoBeClosed = append(toBeClosed, csw)\n+\t\t}\n+\t}\n+\t// Allow InitValueError for any topic updates during runtime.\n+\tw.initType = allowInitValueError\n+\tw.m.numConsumerServices.Update(float64(len(newConsumerServiceWriters)))\n+\n+\t// Apply the new consumer service writers.\n+\tw.Lock()\n+\tfor key, csw := range newConsumerServiceWriters {\n+\t\tif filter, ok := w.filterRegistry[key]; ok {\n+\t\t\tcsw.RegisterFilter(filter)\n+\t\t}\n+\t}\n+\tw.consumerServiceWriters = newConsumerServiceWriters\n+\tw.numShards = t.NumberOfShards()\n+\tw.Unlock()\n+\n+\t// Close removed consumer service.\n+\tgo func() {\n+\t\tfor _, csw := range toBeClosed {\n+\t\t\tcsw.Close()\n+\t\t}\n+\t}()\n+\n+\tif err := multiErr.FinalError(); err != nil {\n+\t\tw.m.topicUpdateError.Inc(1)\n+\t\treturn err\n+\t}\n+\tw.m.topicUpdateSuccess.Inc(1)\n+\treturn nil\n+}\n+\n+func (w *writer) Close() {\n+\tw.Lock()\n+\tif w.isClosed {\n+\t\tw.Unlock()\n+\t\treturn\n+\t}\n+\tw.isClosed = true\n+\tw.Unlock()\n+\n+\tw.value.Unwatch()\n+\tfor _, csw := range w.consumerServiceWriters {\n+\t\tcsw.Close()\n+\t}\n+}\n+\n+func (w *writer) RegisterFilter(sid services.ServiceID, filter producer.FilterFunc) {\n+\tw.Lock()\n+\tkey := sid.String()\n+\tw.filterRegistry[key] = filter\n+\tcsw, ok := w.consumerServiceWriters[key]\n+\tif ok {\n+\t\tcsw.RegisterFilter(filter)\n+\t}\n+\tw.Unlock()","path":"producer/writer/writer.go","position":246,"original_position":246,"commit_id":"87d42d89e46eaa529949d48a7aa177addbaa6b5b","original_commit_id":"87d42d89e46eaa529949d48a7aa177addbaa6b5b","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":"nit: perhaps just defer here.","created_at":"2018-04-20T15:45:34Z","updated_at":"2018-04-20T15:45:54Z","html_url":"https://github.com/m3db/m3msg/pull/10#discussion_r183092825","pull_request_url":"https://api.github.com/repos/m3db/m3msg/pulls/10","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/m3db/m3msg/pulls/comments/183092825"},"html":{"href":"https://github.com/m3db/m3msg/pull/10#discussion_r183092825"},"pull_request":{"href":"https://api.github.com/repos/m3db/m3msg/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/m3db/m3msg/pulls/10","id":182884802,"html_url":"https://github.com/m3db/m3msg/pull/10","diff_url":"https://github.com/m3db/m3msg/pull/10.diff","patch_url":"https://github.com/m3db/m3msg/pull/10.patch","issue_url":"https://api.github.com/repos/m3db/m3msg/issues/10","number":10,"state":"open","locked":false,"title":"Add producer.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":"This pr adds the implementation for `producer.Writer` interface which listens to topic updates and create consumer service writers accordingly. It will then delegate writes to underlying consumer service writers.\r\n\r\n@xichen2020 @jeromefroe @m-sandusky @jskelcy ","created_at":"2018-04-19T20:08:59Z","updated_at":"2018-04-20T15:45:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"afcc7bee03c99f37b253bd93109af5a25a2d768a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/m3db/m3msg/pulls/10/commits","review_comments_url":"https://api.github.com/repos/m3db/m3msg/pulls/10/comments","review_comment_url":"https://api.github.com/repos/m3db/m3msg/pulls/comments{/number}","comments_url":"https://api.github.com/repos/m3db/m3msg/issues/10/comments","statuses_url":"https://api.github.com/repos/m3db/m3msg/statuses/87d42d89e46eaa529949d48a7aa177addbaa6b5b","head":{"label":"m3db:chao-writer3","ref":"chao-writer3","sha":"87d42d89e46eaa529949d48a7aa177addbaa6b5b","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-19T17:46:09Z","pushed_at":"2018-04-19T20:46:11Z","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":102,"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":"4d47608f28e1eb5554378a3f211aeb2ac035c2fc","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-19T17:46:09Z","pushed_at":"2018-04-19T20:46:11Z","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":102,"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/10"},"html":{"href":"https://github.com/m3db/m3msg/pull/10"},"issue":{"href":"https://api.github.com/repos/m3db/m3msg/issues/10"},"comments":{"href":"https://api.github.com/repos/m3db/m3msg/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/m3db/m3msg/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/m3db/m3msg/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/m3db/m3msg/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/m3db/m3msg/statuses/87d42d89e46eaa529949d48a7aa177addbaa6b5b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"xichen2020"}}