{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/etcd/pulls/comments/25120547","id":25120547,"diff_hunk":"@@ -0,0 +1,353 @@\n+package rafthttp\n+\n+import (\n+\t\"fmt\"\n+\t\"io\"\n+\t\"log\"\n+\t\"net/http\"\n+\t\"net/url\"\n+\t\"path\"\n+\t\"strconv\"\n+\t\"sync\"\n+\t\"time\"\n+\n+\t\"github.com/coreos/etcd/etcdserver/stats\"\n+\t\"github.com/coreos/etcd/pkg/types\"\n+\t\"github.com/coreos/etcd/raft/raftpb\"\n+)\n+\n+type streamType string\n+\n+const (\n+\tstreamTypeGeneral streamType = \"general\"\n+\tstreamTypeMsgApp  streamType = \"msgapp\"\n+\n+\tstreamBufSize = 4096\n+)\n+\n+var (\n+\t// linkHeartbeatMessage is a special message used as heartbeat message in\n+\t// link layer. It never conflicts with messages from raft because raft\n+\t// doesn't send out messages without From and To fields.\n+\tlinkHeartbeatMessage = raftpb.Message{Type: raftpb.MsgHeartbeat}\n+)\n+\n+func isLinkHeartbeatMessage(m raftpb.Message) bool {\n+\treturn m.Type == raftpb.MsgHeartbeat && m.From == 0 && m.To == 0\n+}\n+\n+type outgoingConn struct {\n+\tt       streamType\n+\ttermStr string\n+\tio.Writer\n+\thttp.Flusher\n+\tio.Closer\n+}\n+\n+// streamWriter is a long-running worker that writes messages into the\n+// attached outgoingConn.\n+type streamWriter struct {\n+\tfs *stats.FollowerStats\n+\n+\tmu      sync.Mutex // guard field working\n+\tworking bool\n+\n+\tmsgc  chan raftpb.Message\n+\tconnc chan *outgoingConn\n+\tstopc chan struct{}\n+\tdone  chan struct{}\n+}\n+\n+func startStreamWriter(fs *stats.FollowerStats) *streamWriter {\n+\tw := &streamWriter{\n+\t\tfs:    fs,\n+\t\tmsgc:  make(chan raftpb.Message, streamBufSize),\n+\t\tconnc: make(chan *outgoingConn),\n+\t\tstopc: make(chan struct{}),\n+\t\tdone:  make(chan struct{}),\n+\t}\n+\tgo w.run()\n+\treturn w\n+}\n+\n+func (cw *streamWriter) run() {\n+\tvar msgc chan raftpb.Message\n+\tvar heartbeatc <-chan time.Time\n+\tvar t streamType\n+\tvar msgAppTerm uint64\n+\tvar enc encoder\n+\tvar flusher http.Flusher\n+\tvar closer io.Closer\n+\ttickc := time.Tick(ConnReadTimeout / 3)\n+\treset := func() {\n+\t\tcw.mu.Lock()\n+\t\tdefer cw.mu.Unlock()\n+\t\tif cw.working {\n+\t\t\tcloser.Close()\n+\t\t}\n+\t\theartbeatc, msgc = nil, nil\n+\t\tcw.working = false\n+\t}\n+\tuseConn := func(conn *outgoingConn) {\n+\t\tcw.mu.Lock()\n+\t\tdefer cw.mu.Unlock()\n+\t\tt = conn.t\n+\t\tswitch conn.t {\n+\t\tcase streamTypeMsgApp:\n+\t\t\tvar err error\n+\t\t\tmsgAppTerm, err = strconv.ParseUint(conn.termStr, 10, 64)\n+\t\t\tif err != nil {\n+\t\t\t\tlog.Panicf(\"rafthttp: unexpected parse term %s error: %v\", conn.termStr, err)\n+\t\t\t}\n+\t\t\tenc = &msgAppEncoder{w: conn.Writer, fs: cw.fs}\n+\t\tcase streamTypeGeneral:\n+\t\t\tenc = &messageEncoder{w: conn.Writer}\n+\t\tdefault:\n+\t\t\tlog.Panicf(\"rafthttp: unhandled stream type %s\", conn.t)\n+\t\t}\n+\t\tflusher = conn.Flusher\n+\t\tcloser = conn.Closer\n+\t\theartbeatc, msgc = tickc, cw.msgc\n+\t\tcw.working = true\n+\t}\n+\n+\tfor {\n+\t\tselect {\n+\t\tcase <-heartbeatc:\n+\t\t\tif err := enc.encode(linkHeartbeatMessage); err != nil {\n+\t\t\t\tlog.Printf(\"rafthttp: encountered error heartbeating on stream: %v\", err)\n+\t\t\t\treset()\n+\t\t\t\tcontinue\n+\t\t\t}\n+\t\t\tflusher.Flush()\n+\t\tcase m := <-msgc:\n+\t\t\tif t == streamTypeMsgApp && m.Term != msgAppTerm {\n+\t\t\t\t// TODO: reasonable retry logic\n+\t\t\t\tcontinue\n+\t\t\t}\n+\t\t\tif err := enc.encode(m); err != nil {\n+\t\t\t\tlog.Printf(\"rafthttp: encountered error encoding to stream: %v\", err)\n+\t\t\t\treset()\n+\t\t\t\tcontinue\n+\t\t\t}\n+\t\t\tflusher.Flush()\n+\t\tcase conn := <-cw.connc:\n+\t\t\treset()\n+\t\t\tuseConn(conn)\n+\t\tcase <-cw.stopc:\n+\t\t\treset()\n+\t\t\tclose(cw.done)\n+\t\t\treturn\n+\t\t}\n+\t}\n+}\n+\n+func (cw *streamWriter) isWorking() bool {\n+\tcw.mu.Lock()\n+\tdefer cw.mu.Unlock()\n+\treturn cw.working\n+}\n+\n+func (cw *streamWriter) attach(conn *outgoingConn) bool {\n+\tselect {\n+\tcase cw.connc <- conn:\n+\t\treturn true\n+\tcase <-cw.done:\n+\t\treturn false\n+\t}\n+}\n+\n+func (cw *streamWriter) stop() {\n+\tclose(cw.stopc)\n+\t<-cw.done\n+}\n+\n+// streamReader is a long-running worker that dials to the remote stream\n+// endponit and reads messages from the response body returned.\n+type streamReader struct {\n+\ttr       http.RoundTripper\n+\tu        string\n+\tt        streamType\n+\tfrom, to types.ID\n+\tcid      types.ID\n+\n+\tmu         sync.Mutex\n+\tmsgAppTerm uint64\n+\treq        *http.Request\n+\tcloser     io.Closer\n+\n+\trecvc chan<- raftpb.Message\n+\tdialc chan struct{}\n+\tstopc chan struct{}\n+\tdone  chan struct{}\n+}\n+\n+func startStreamReader(tr http.RoundTripper, u string, t streamType, from, to, cid types.ID, recvc chan<- raftpb.Message) *streamReader {\n+\tr := &streamReader{\n+\t\ttr:    tr,\n+\t\tu:     u,\n+\t\tt:     t,\n+\t\tfrom:  from,\n+\t\tto:    to,\n+\t\tcid:   cid,\n+\t\trecvc: recvc,\n+\t\tdialc: make(chan struct{}, 1),\n+\t\tstopc: make(chan struct{}),\n+\t\tdone:  make(chan struct{}),\n+\t}\n+\tgo r.run()\n+\treturn r\n+}\n+\n+func (cr *streamReader) run() {\n+\tvar dec decoder\n+\tnextc := make(chan struct{}, 1)\n+\tsendNext := func() {\n+\t\tselect {\n+\t\tcase nextc <- struct{}{}:\n+\t\tdefault:\n+\t\t}\n+\t}\n+\tif cr.t != streamTypeMsgApp {\n+\t\tsendNext()\n+\t}\n+\tfor {\n+\t\tselect {\n+\t\tcase <-cr.dialc:\n+\t\t\tcr.resetCloser()\n+\t\tcase <-cr.stopc:\n+\t\t\tcr.resetCloser()\n+\t\t\tclose(cr.done)\n+\t\t\treturn\n+\t\tcase <-nextc:\n+\t\t}\n+\t\tif !cr.isWorking() {\n+\t\t\trc, err := cr.dial()\n+\t\t\tif err != nil {\n+\t\t\t\tlog.Printf(\"rafthttp: roundtripping error: %v\", err)\n+\t\t\t\ttime.AfterFunc(100*time.Millisecond, sendNext)\n+\t\t\t\tcontinue\n+\t\t\t}\n+\t\t\tcr.mu.Lock()\n+\t\t\tswitch cr.t {\n+\t\t\tcase streamTypeMsgApp:\n+\t\t\t\tdec = &msgAppDecoder{r: rc, local: cr.from, remote: cr.to, term: cr.msgAppTerm}\n+\t\t\tcase streamTypeGeneral:\n+\t\t\t\tdec = &messageDecoder{r: rc}\n+\t\t\tdefault:\n+\t\t\t\tlog.Panicf(\"rafthttp: unhandled stream type %s\", cr.t)\n+\t\t\t}\n+\t\t\tcr.closer = rc\n+\t\t\tcr.mu.Unlock()\n+\t\t}\n+\t\tm, err := dec.decode()","path":"rafthttp/stream.go","position":243,"original_position":243,"commit_id":"02daf3d49e7b8eb848aa33025f37d32530e200f3","original_commit_id":"02daf3d49e7b8eb848aa33025f37d32530e200f3","user":{"login":"yichengq","id":2976232,"avatar_url":"https://avatars.githubusercontent.com/u/2976232?v=3","gravatar_id":"","url":"https://api.github.com/users/yichengq","html_url":"https://github.com/yichengq","followers_url":"https://api.github.com/users/yichengq/followers","following_url":"https://api.github.com/users/yichengq/following{/other_user}","gists_url":"https://api.github.com/users/yichengq/gists{/gist_id}","starred_url":"https://api.github.com/users/yichengq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yichengq/subscriptions","organizations_url":"https://api.github.com/users/yichengq/orgs","repos_url":"https://api.github.com/users/yichengq/repos","events_url":"https://api.github.com/users/yichengq/events{/privacy}","received_events_url":"https://api.github.com/users/yichengq/received_events","type":"User","site_admin":false},"body":"let me try","created_at":"2015-02-21T07:34:20Z","updated_at":"2015-02-21T07:34:20Z","html_url":"https://github.com/coreos/etcd/pull/2323#discussion_r25120547","pull_request_url":"https://api.github.com/repos/coreos/etcd/pulls/2323","_links":{"self":{"href":"https://api.github.com/repos/coreos/etcd/pulls/comments/25120547"},"html":{"href":"https://github.com/coreos/etcd/pull/2323#discussion_r25120547"},"pull_request":{"href":"https://api.github.com/repos/coreos/etcd/pulls/2323"}}},"pull_request":{"url":"https://api.github.com/repos/coreos/etcd/pulls/2323","id":29402901,"html_url":"https://github.com/coreos/etcd/pull/2323","diff_url":"https://github.com/coreos/etcd/pull/2323.diff","patch_url":"https://github.com/coreos/etcd/pull/2323.patch","issue_url":"https://api.github.com/repos/coreos/etcd/issues/2323","number":2323,"state":"open","locked":false,"title":"rafthttp: refactor peer","user":{"login":"yichengq","id":2976232,"avatar_url":"https://avatars.githubusercontent.com/u/2976232?v=3","gravatar_id":"","url":"https://api.github.com/users/yichengq","html_url":"https://github.com/yichengq","followers_url":"https://api.github.com/users/yichengq/followers","following_url":"https://api.github.com/users/yichengq/following{/other_user}","gists_url":"https://api.github.com/users/yichengq/gists{/gist_id}","starred_url":"https://api.github.com/users/yichengq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yichengq/subscriptions","organizations_url":"https://api.github.com/users/yichengq/orgs","repos_url":"https://api.github.com/users/yichengq/repos","events_url":"https://api.github.com/users/yichengq/events{/privacy}","received_events_url":"https://api.github.com/users/yichengq/received_events","type":"User","site_admin":false},"body":"Architecture:\r\nEach peer manages three worker:\r\nmsgApp stream: receive/send entries of msgApp fast\r\ngeneral stream: receive/send all other messages fast\r\npipeline: the safest but slowest way to receive/send messages\r\n\r\nPerformance:\r\nEnvironment: MacBook Pro (Retina, 15-inch, Mid 2014), 3-member cluster, 200 clients\r\npropose to leader: 7245 req/s\r\npropose to follower: 1963 req/s\r\n\r\nFeedback is welcome.\r\n\r\nKeep working:\r\n- [x] fix tests\r\n- [ ] add tests\r\n\r\nFurther thoughts:\r\n1. more specific-usage streams can make it faster and more stable\r\n2. the speed that propose to follower is restricted heavily because we don't recover CommitIndex in msgApp stream","created_at":"2015-02-16T21:49:20Z","updated_at":"2015-02-21T07:34:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4833ea24db442410f2559114d6440c949b9b3648","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/coreos/etcd/pulls/2323/commits","review_comments_url":"https://api.github.com/repos/coreos/etcd/pulls/2323/comments","review_comment_url":"https://api.github.com/repos/coreos/etcd/pulls/comments/{number}","comments_url":"https://api.github.com/repos/coreos/etcd/issues/2323/comments","statuses_url":"https://api.github.com/repos/coreos/etcd/statuses/02daf3d49e7b8eb848aa33025f37d32530e200f3","head":{"label":"yichengq:320","ref":"320","sha":"02daf3d49e7b8eb848aa33025f37d32530e200f3","user":{"login":"yichengq","id":2976232,"avatar_url":"https://avatars.githubusercontent.com/u/2976232?v=3","gravatar_id":"","url":"https://api.github.com/users/yichengq","html_url":"https://github.com/yichengq","followers_url":"https://api.github.com/users/yichengq/followers","following_url":"https://api.github.com/users/yichengq/following{/other_user}","gists_url":"https://api.github.com/users/yichengq/gists{/gist_id}","starred_url":"https://api.github.com/users/yichengq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yichengq/subscriptions","organizations_url":"https://api.github.com/users/yichengq/orgs","repos_url":"https://api.github.com/users/yichengq/repos","events_url":"https://api.github.com/users/yichengq/events{/privacy}","received_events_url":"https://api.github.com/users/yichengq/received_events","type":"User","site_admin":false},"repo":{"id":16744058,"name":"etcd","full_name":"yichengq/etcd","owner":{"login":"yichengq","id":2976232,"avatar_url":"https://avatars.githubusercontent.com/u/2976232?v=3","gravatar_id":"","url":"https://api.github.com/users/yichengq","html_url":"https://github.com/yichengq","followers_url":"https://api.github.com/users/yichengq/followers","following_url":"https://api.github.com/users/yichengq/following{/other_user}","gists_url":"https://api.github.com/users/yichengq/gists{/gist_id}","starred_url":"https://api.github.com/users/yichengq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yichengq/subscriptions","organizations_url":"https://api.github.com/users/yichengq/orgs","repos_url":"https://api.github.com/users/yichengq/repos","events_url":"https://api.github.com/users/yichengq/events{/privacy}","received_events_url":"https://api.github.com/users/yichengq/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yichengq/etcd","description":"A highly-available key value store for shared configuration and service discovery","fork":true,"url":"https://api.github.com/repos/yichengq/etcd","forks_url":"https://api.github.com/repos/yichengq/etcd/forks","keys_url":"https://api.github.com/repos/yichengq/etcd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yichengq/etcd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yichengq/etcd/teams","hooks_url":"https://api.github.com/repos/yichengq/etcd/hooks","issue_events_url":"https://api.github.com/repos/yichengq/etcd/issues/events{/number}","events_url":"https://api.github.com/repos/yichengq/etcd/events","assignees_url":"https://api.github.com/repos/yichengq/etcd/assignees{/user}","branches_url":"https://api.github.com/repos/yichengq/etcd/branches{/branch}","tags_url":"https://api.github.com/repos/yichengq/etcd/tags","blobs_url":"https://api.github.com/repos/yichengq/etcd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yichengq/etcd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yichengq/etcd/git/refs{/sha}","trees_url":"https://api.github.com/repos/yichengq/etcd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yichengq/etcd/statuses/{sha}","languages_url":"https://api.github.com/repos/yichengq/etcd/languages","stargazers_url":"https://api.github.com/repos/yichengq/etcd/stargazers","contributors_url":"https://api.github.com/repos/yichengq/etcd/contributors","subscribers_url":"https://api.github.com/repos/yichengq/etcd/subscribers","subscription_url":"https://api.github.com/repos/yichengq/etcd/subscription","commits_url":"https://api.github.com/repos/yichengq/etcd/commits{/sha}","git_commits_url":"https://api.github.com/repos/yichengq/etcd/git/commits{/sha}","comments_url":"https://api.github.com/repos/yichengq/etcd/comments{/number}","issue_comment_url":"https://api.github.com/repos/yichengq/etcd/issues/comments/{number}","contents_url":"https://api.github.com/repos/yichengq/etcd/contents/{+path}","compare_url":"https://api.github.com/repos/yichengq/etcd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yichengq/etcd/merges","archive_url":"https://api.github.com/repos/yichengq/etcd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yichengq/etcd/downloads","issues_url":"https://api.github.com/repos/yichengq/etcd/issues{/number}","pulls_url":"https://api.github.com/repos/yichengq/etcd/pulls{/number}","milestones_url":"https://api.github.com/repos/yichengq/etcd/milestones{/number}","notifications_url":"https://api.github.com/repos/yichengq/etcd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yichengq/etcd/labels{/name}","releases_url":"https://api.github.com/repos/yichengq/etcd/releases{/id}","created_at":"2014-02-11T20:18:23Z","updated_at":"2015-02-12T19:42:08Z","pushed_at":"2015-02-20T23:15:45Z","git_url":"git://github.com/yichengq/etcd.git","ssh_url":"git@github.com:yichengq/etcd.git","clone_url":"https://github.com/yichengq/etcd.git","svn_url":"https://github.com/yichengq/etcd","homepage":"","size":17186,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"coreos:210","ref":"210","sha":"676ba5b606a5514752399f65561476b39e15daa4","user":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"repo":{"id":11225014,"name":"etcd","full_name":"coreos/etcd","owner":{"login":"coreos","id":3730757,"avatar_url":"https://avatars.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coreos/etcd","description":"A highly-available key value store for shared configuration and service discovery","fork":false,"url":"https://api.github.com/repos/coreos/etcd","forks_url":"https://api.github.com/repos/coreos/etcd/forks","keys_url":"https://api.github.com/repos/coreos/etcd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/etcd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/etcd/teams","hooks_url":"https://api.github.com/repos/coreos/etcd/hooks","issue_events_url":"https://api.github.com/repos/coreos/etcd/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/etcd/events","assignees_url":"https://api.github.com/repos/coreos/etcd/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/etcd/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/etcd/tags","blobs_url":"https://api.github.com/repos/coreos/etcd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/etcd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/etcd/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/etcd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/etcd/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/etcd/languages","stargazers_url":"https://api.github.com/repos/coreos/etcd/stargazers","contributors_url":"https://api.github.com/repos/coreos/etcd/contributors","subscribers_url":"https://api.github.com/repos/coreos/etcd/subscribers","subscription_url":"https://api.github.com/repos/coreos/etcd/subscription","commits_url":"https://api.github.com/repos/coreos/etcd/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/etcd/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/etcd/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/etcd/issues/comments/{number}","contents_url":"https://api.github.com/repos/coreos/etcd/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/etcd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/etcd/merges","archive_url":"https://api.github.com/repos/coreos/etcd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/etcd/downloads","issues_url":"https://api.github.com/repos/coreos/etcd/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/etcd/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/etcd/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/etcd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/etcd/labels{/name}","releases_url":"https://api.github.com/repos/coreos/etcd/releases{/id}","created_at":"2013-07-06T21:57:21Z","updated_at":"2015-02-21T00:23:30Z","pushed_at":"2015-02-20T23:15:43Z","git_url":"git://github.com/coreos/etcd.git","ssh_url":"git@github.com:coreos/etcd.git","clone_url":"https://github.com/coreos/etcd.git","svn_url":"https://github.com/coreos/etcd","homepage":"","size":28891,"stargazers_count":5684,"watchers_count":5684,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":669,"mirror_url":null,"open_issues_count":120,"forks":669,"open_issues":120,"watchers":5684,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/etcd/pulls/2323"},"html":{"href":"https://github.com/coreos/etcd/pull/2323"},"issue":{"href":"https://api.github.com/repos/coreos/etcd/issues/2323"},"comments":{"href":"https://api.github.com/repos/coreos/etcd/issues/2323/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/etcd/pulls/2323/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/etcd/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/coreos/etcd/pulls/2323/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/etcd/statuses/02daf3d49e7b8eb848aa33025f37d32530e200f3"}}}}