{"action":"created","comment":{"url":"https://api.github.com/repos/tikv/deep-dive-tikv/pulls/comments/244277799","pull_request_review_id":188232986,"id":244277799,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NDI3Nzc5OQ==","diff_hunk":"@@ -0,0 +1,13 @@\n+# Multi-raft \n+\n+If you've researched Consensus before, please note that comparing Multi-Raft to Raft is not at all like comparing Multi-Paxos to Paxos. Here Multi-Raft only means we manage multiple Raft consensus groups on one node. From the above section, we know that there are multiple different partitions on each node, if there is only one Raft group for each node, the partitions losing its meaning. So Raft group is divided into multiple Raft groups in terms of partitions. \n+\n+For each Raft group, the process of the algorithm is still as before, we only introduce a layer on top of Raft to manage these Raft consensus groups as a whole.\n+\n+TiKV uses an event loop to drive all the processes in a batch manner. It polls all the Raft groups to drive the Raft state machine every 1000ms and accepts the requests from the outside clients and Raft messages sent by other nodes through the notify mechanism of the event loop.","path":"src/scalability/multi-raft.md","position":7,"original_position":7,"commit_id":"b29e1b1ae2c11336e506a452c034104744164e02","original_commit_id":"b29e1b1ae2c11336e506a452c034104744164e02","user":{"login":"CaitinChen","id":34535727,"node_id":"MDQ6VXNlcjM0NTM1NzI3","avatar_url":"https://avatars2.githubusercontent.com/u/34535727?v=4","gravatar_id":"","url":"https://api.github.com/users/CaitinChen","html_url":"https://github.com/CaitinChen","followers_url":"https://api.github.com/users/CaitinChen/followers","following_url":"https://api.github.com/users/CaitinChen/following{/other_user}","gists_url":"https://api.github.com/users/CaitinChen/gists{/gist_id}","starred_url":"https://api.github.com/users/CaitinChen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CaitinChen/subscriptions","organizations_url":"https://api.github.com/users/CaitinChen/orgs","repos_url":"https://api.github.com/users/CaitinChen/repos","events_url":"https://api.github.com/users/CaitinChen/events{/privacy}","received_events_url":"https://api.github.com/users/CaitinChen/received_events","type":"User","site_admin":false},"body":"```suggestion\r\nTiKV uses an event loop to drive all the processes in a batch manner. It polls all the Raft groups to drive the Raft state machine every 1000ms and accepts the requests from the outside clients and Raft messages sent by other nodes through the notification mechanism of the event loop.\r\n```","created_at":"2018-12-28T07:56:41Z","updated_at":"2018-12-28T07:59:37Z","html_url":"https://github.com/tikv/deep-dive-tikv/pull/16#discussion_r244277799","pull_request_url":"https://api.github.com/repos/tikv/deep-dive-tikv/pulls/16","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/tikv/deep-dive-tikv/pulls/comments/244277799"},"html":{"href":"https://github.com/tikv/deep-dive-tikv/pull/16#discussion_r244277799"},"pull_request":{"href":"https://api.github.com/repos/tikv/deep-dive-tikv/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/tikv/deep-dive-tikv/pulls/16","id":233382846,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzMzgyODQ2","html_url":"https://github.com/tikv/deep-dive-tikv/pull/16","diff_url":"https://github.com/tikv/deep-dive-tikv/pull/16.diff","patch_url":"https://github.com/tikv/deep-dive-tikv/pull/16.patch","issue_url":"https://api.github.com/repos/tikv/deep-dive-tikv/issues/16","number":16,"state":"open","locked":false,"title":"Add scalability chapter","user":{"login":"Connor1996","id":13497871,"node_id":"MDQ6VXNlcjEzNDk3ODcx","avatar_url":"https://avatars1.githubusercontent.com/u/13497871?v=4","gravatar_id":"","url":"https://api.github.com/users/Connor1996","html_url":"https://github.com/Connor1996","followers_url":"https://api.github.com/users/Connor1996/followers","following_url":"https://api.github.com/users/Connor1996/following{/other_user}","gists_url":"https://api.github.com/users/Connor1996/gists{/gist_id}","starred_url":"https://api.github.com/users/Connor1996/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Connor1996/subscriptions","organizations_url":"https://api.github.com/users/Connor1996/orgs","repos_url":"https://api.github.com/users/Connor1996/repos","events_url":"https://api.github.com/users/Connor1996/events{/privacy}","received_events_url":"https://api.github.com/users/Connor1996/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Connor1996 <zbk602423539@gmail.com>","created_at":"2018-11-25T15:39:22Z","updated_at":"2018-12-28T07:59:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2af3f0a1680971447a19d6871ed6e76f520a0011","assignee":{"login":"CaitinChen","id":34535727,"node_id":"MDQ6VXNlcjM0NTM1NzI3","avatar_url":"https://avatars2.githubusercontent.com/u/34535727?v=4","gravatar_id":"","url":"https://api.github.com/users/CaitinChen","html_url":"https://github.com/CaitinChen","followers_url":"https://api.github.com/users/CaitinChen/followers","following_url":"https://api.github.com/users/CaitinChen/following{/other_user}","gists_url":"https://api.github.com/users/CaitinChen/gists{/gist_id}","starred_url":"https://api.github.com/users/CaitinChen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CaitinChen/subscriptions","organizations_url":"https://api.github.com/users/CaitinChen/orgs","repos_url":"https://api.github.com/users/CaitinChen/repos","events_url":"https://api.github.com/users/CaitinChen/events{/privacy}","received_events_url":"https://api.github.com/users/CaitinChen/received_events","type":"User","site_admin":false},"assignees":[{"login":"CaitinChen","id":34535727,"node_id":"MDQ6VXNlcjM0NTM1NzI3","avatar_url":"https://avatars2.githubusercontent.com/u/34535727?v=4","gravatar_id":"","url":"https://api.github.com/users/CaitinChen","html_url":"https://github.com/CaitinChen","followers_url":"https://api.github.com/users/CaitinChen/followers","following_url":"https://api.github.com/users/CaitinChen/following{/other_user}","gists_url":"https://api.github.com/users/CaitinChen/gists{/gist_id}","starred_url":"https://api.github.com/users/CaitinChen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CaitinChen/subscriptions","organizations_url":"https://api.github.com/users/CaitinChen/orgs","repos_url":"https://api.github.com/users/CaitinChen/repos","events_url":"https://api.github.com/users/CaitinChen/events{/privacy}","received_events_url":"https://api.github.com/users/CaitinChen/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"lilin90","id":30922556,"node_id":"MDQ6VXNlcjMwOTIyNTU2","avatar_url":"https://avatars1.githubusercontent.com/u/30922556?v=4","gravatar_id":"","url":"https://api.github.com/users/lilin90","html_url":"https://github.com/lilin90","followers_url":"https://api.github.com/users/lilin90/followers","following_url":"https://api.github.com/users/lilin90/following{/other_user}","gists_url":"https://api.github.com/users/lilin90/gists{/gist_id}","starred_url":"https://api.github.com/users/lilin90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lilin90/subscriptions","organizations_url":"https://api.github.com/users/lilin90/orgs","repos_url":"https://api.github.com/users/lilin90/repos","events_url":"https://api.github.com/users/lilin90/events{/privacy}","received_events_url":"https://api.github.com/users/lilin90/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tikv/deep-dive-tikv/pulls/16/commits","review_comments_url":"https://api.github.com/repos/tikv/deep-dive-tikv/pulls/16/comments","review_comment_url":"https://api.github.com/repos/tikv/deep-dive-tikv/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tikv/deep-dive-tikv/issues/16/comments","statuses_url":"https://api.github.com/repos/tikv/deep-dive-tikv/statuses/b29e1b1ae2c11336e506a452c034104744164e02","head":{"label":"Connor1996:master","ref":"master","sha":"b29e1b1ae2c11336e506a452c034104744164e02","user":{"login":"Connor1996","id":13497871,"node_id":"MDQ6VXNlcjEzNDk3ODcx","avatar_url":"https://avatars1.githubusercontent.com/u/13497871?v=4","gravatar_id":"","url":"https://api.github.com/users/Connor1996","html_url":"https://github.com/Connor1996","followers_url":"https://api.github.com/users/Connor1996/followers","following_url":"https://api.github.com/users/Connor1996/following{/other_user}","gists_url":"https://api.github.com/users/Connor1996/gists{/gist_id}","starred_url":"https://api.github.com/users/Connor1996/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Connor1996/subscriptions","organizations_url":"https://api.github.com/users/Connor1996/orgs","repos_url":"https://api.github.com/users/Connor1996/repos","events_url":"https://api.github.com/users/Connor1996/events{/privacy}","received_events_url":"https://api.github.com/users/Connor1996/received_events","type":"User","site_admin":false},"repo":{"id":159046903,"node_id":"MDEwOlJlcG9zaXRvcnkxNTkwNDY5MDM=","name":"deep-dive-tikv","full_name":"Connor1996/deep-dive-tikv","private":false,"owner":{"login":"Connor1996","id":13497871,"node_id":"MDQ6VXNlcjEzNDk3ODcx","avatar_url":"https://avatars1.githubusercontent.com/u/13497871?v=4","gravatar_id":"","url":"https://api.github.com/users/Connor1996","html_url":"https://github.com/Connor1996","followers_url":"https://api.github.com/users/Connor1996/followers","following_url":"https://api.github.com/users/Connor1996/following{/other_user}","gists_url":"https://api.github.com/users/Connor1996/gists{/gist_id}","starred_url":"https://api.github.com/users/Connor1996/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Connor1996/subscriptions","organizations_url":"https://api.github.com/users/Connor1996/orgs","repos_url":"https://api.github.com/users/Connor1996/repos","events_url":"https://api.github.com/users/Connor1996/events{/privacy}","received_events_url":"https://api.github.com/users/Connor1996/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Connor1996/deep-dive-tikv","description":"How do we build a distributed, transactional key-value database - TiKV?","fork":true,"url":"https://api.github.com/repos/Connor1996/deep-dive-tikv","forks_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/forks","keys_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/teams","hooks_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/hooks","issue_events_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/issues/events{/number}","events_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/events","assignees_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/assignees{/user}","branches_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/branches{/branch}","tags_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/tags","blobs_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/git/refs{/sha}","trees_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/statuses/{sha}","languages_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/languages","stargazers_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/stargazers","contributors_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/contributors","subscribers_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/subscribers","subscription_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/subscription","commits_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/commits{/sha}","git_commits_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/git/commits{/sha}","comments_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/comments{/number}","issue_comment_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/issues/comments{/number}","contents_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/contents/{+path}","compare_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/merges","archive_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/downloads","issues_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/issues{/number}","pulls_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/pulls{/number}","milestones_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/milestones{/number}","notifications_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/labels{/name}","releases_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/releases{/id}","deployments_url":"https://api.github.com/repos/Connor1996/deep-dive-tikv/deployments","created_at":"2018-11-25T15:37:08Z","updated_at":"2018-12-22T03:42:41Z","pushed_at":"2018-12-22T03:42:39Z","git_url":"git://github.com/Connor1996/deep-dive-tikv.git","ssh_url":"git@github.com:Connor1996/deep-dive-tikv.git","clone_url":"https://github.com/Connor1996/deep-dive-tikv.git","svn_url":"https://github.com/Connor1996/deep-dive-tikv","homepage":"https://tikv.github.io/deep-dive-tikv","size":622,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":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":"tikv:master","ref":"master","sha":"71294134aa876ad6351443663d7156bfbb599977","user":{"login":"tikv","id":41004122,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDA0MTIy","avatar_url":"https://avatars2.githubusercontent.com/u/41004122?v=4","gravatar_id":"","url":"https://api.github.com/users/tikv","html_url":"https://github.com/tikv","followers_url":"https://api.github.com/users/tikv/followers","following_url":"https://api.github.com/users/tikv/following{/other_user}","gists_url":"https://api.github.com/users/tikv/gists{/gist_id}","starred_url":"https://api.github.com/users/tikv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tikv/subscriptions","organizations_url":"https://api.github.com/users/tikv/orgs","repos_url":"https://api.github.com/users/tikv/repos","events_url":"https://api.github.com/users/tikv/events{/privacy}","received_events_url":"https://api.github.com/users/tikv/received_events","type":"Organization","site_admin":false},"repo":{"id":146400837,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY0MDA4Mzc=","name":"deep-dive-tikv","full_name":"tikv/deep-dive-tikv","private":false,"owner":{"login":"tikv","id":41004122,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDA0MTIy","avatar_url":"https://avatars2.githubusercontent.com/u/41004122?v=4","gravatar_id":"","url":"https://api.github.com/users/tikv","html_url":"https://github.com/tikv","followers_url":"https://api.github.com/users/tikv/followers","following_url":"https://api.github.com/users/tikv/following{/other_user}","gists_url":"https://api.github.com/users/tikv/gists{/gist_id}","starred_url":"https://api.github.com/users/tikv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tikv/subscriptions","organizations_url":"https://api.github.com/users/tikv/orgs","repos_url":"https://api.github.com/users/tikv/repos","events_url":"https://api.github.com/users/tikv/events{/privacy}","received_events_url":"https://api.github.com/users/tikv/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/tikv/deep-dive-tikv","description":"How do we build a distributed, transactional key-value database - TiKV?","fork":false,"url":"https://api.github.com/repos/tikv/deep-dive-tikv","forks_url":"https://api.github.com/repos/tikv/deep-dive-tikv/forks","keys_url":"https://api.github.com/repos/tikv/deep-dive-tikv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tikv/deep-dive-tikv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tikv/deep-dive-tikv/teams","hooks_url":"https://api.github.com/repos/tikv/deep-dive-tikv/hooks","issue_events_url":"https://api.github.com/repos/tikv/deep-dive-tikv/issues/events{/number}","events_url":"https://api.github.com/repos/tikv/deep-dive-tikv/events","assignees_url":"https://api.github.com/repos/tikv/deep-dive-tikv/assignees{/user}","branches_url":"https://api.github.com/repos/tikv/deep-dive-tikv/branches{/branch}","tags_url":"https://api.github.com/repos/tikv/deep-dive-tikv/tags","blobs_url":"https://api.github.com/repos/tikv/deep-dive-tikv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tikv/deep-dive-tikv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tikv/deep-dive-tikv/git/refs{/sha}","trees_url":"https://api.github.com/repos/tikv/deep-dive-tikv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tikv/deep-dive-tikv/statuses/{sha}","languages_url":"https://api.github.com/repos/tikv/deep-dive-tikv/languages","stargazers_url":"https://api.github.com/repos/tikv/deep-dive-tikv/stargazers","contributors_url":"https://api.github.com/repos/tikv/deep-dive-tikv/contributors","subscribers_url":"https://api.github.com/repos/tikv/deep-dive-tikv/subscribers","subscription_url":"https://api.github.com/repos/tikv/deep-dive-tikv/subscription","commits_url":"https://api.github.com/repos/tikv/deep-dive-tikv/commits{/sha}","git_commits_url":"https://api.github.com/repos/tikv/deep-dive-tikv/git/commits{/sha}","comments_url":"https://api.github.com/repos/tikv/deep-dive-tikv/comments{/number}","issue_comment_url":"https://api.github.com/repos/tikv/deep-dive-tikv/issues/comments{/number}","contents_url":"https://api.github.com/repos/tikv/deep-dive-tikv/contents/{+path}","compare_url":"https://api.github.com/repos/tikv/deep-dive-tikv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tikv/deep-dive-tikv/merges","archive_url":"https://api.github.com/repos/tikv/deep-dive-tikv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tikv/deep-dive-tikv/downloads","issues_url":"https://api.github.com/repos/tikv/deep-dive-tikv/issues{/number}","pulls_url":"https://api.github.com/repos/tikv/deep-dive-tikv/pulls{/number}","milestones_url":"https://api.github.com/repos/tikv/deep-dive-tikv/milestones{/number}","notifications_url":"https://api.github.com/repos/tikv/deep-dive-tikv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tikv/deep-dive-tikv/labels{/name}","releases_url":"https://api.github.com/repos/tikv/deep-dive-tikv/releases{/id}","deployments_url":"https://api.github.com/repos/tikv/deep-dive-tikv/deployments","created_at":"2018-08-28T06:18:56Z","updated_at":"2018-12-21T22:40:00Z","pushed_at":"2018-12-25T03:44:21Z","git_url":"git://github.com/tikv/deep-dive-tikv.git","ssh_url":"git@github.com:tikv/deep-dive-tikv.git","clone_url":"https://github.com/tikv/deep-dive-tikv.git","svn_url":"https://github.com/tikv/deep-dive-tikv","homepage":"https://tikv.github.io/deep-dive-tikv","size":684,"stargazers_count":52,"watchers_count":52,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":5,"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":9,"open_issues":5,"watchers":52,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tikv/deep-dive-tikv/pulls/16"},"html":{"href":"https://github.com/tikv/deep-dive-tikv/pull/16"},"issue":{"href":"https://api.github.com/repos/tikv/deep-dive-tikv/issues/16"},"comments":{"href":"https://api.github.com/repos/tikv/deep-dive-tikv/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/tikv/deep-dive-tikv/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/tikv/deep-dive-tikv/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tikv/deep-dive-tikv/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/tikv/deep-dive-tikv/statuses/b29e1b1ae2c11336e506a452c034104744164e02"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"CaitinChen"}}