{"action":"opened","number":25,"pull_request":{"url":"https://api.github.com/repos/rabbitmq/ra/pulls/25","id":226954287,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2OTU0Mjg3","html_url":"https://github.com/rabbitmq/ra/pull/25","diff_url":"https://github.com/rabbitmq/ra/pull/25.diff","patch_url":"https://github.com/rabbitmq/ra/pull/25.patch","issue_url":"https://api.github.com/repos/rabbitmq/ra/issues/25","number":25,"state":"open","locked":false,"title":"Custom snapshot","user":{"login":"hairyhum","id":784180,"node_id":"MDQ6VXNlcjc4NDE4MA==","avatar_url":"https://avatars1.githubusercontent.com/u/784180?v=4","gravatar_id":"","url":"https://api.github.com/users/hairyhum","html_url":"https://github.com/hairyhum","followers_url":"https://api.github.com/users/hairyhum/followers","following_url":"https://api.github.com/users/hairyhum/following{/other_user}","gists_url":"https://api.github.com/users/hairyhum/gists{/gist_id}","starred_url":"https://api.github.com/users/hairyhum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hairyhum/subscriptions","organizations_url":"https://api.github.com/users/hairyhum/orgs","repos_url":"https://api.github.com/users/hairyhum/repos","events_url":"https://api.github.com/users/hairyhum/events{/privacy}","received_events_url":"https://api.github.com/users/hairyhum/received_events","type":"User","site_admin":false},"body":"Make snapshot module pluggable.\r\n\r\nAdd the `ra_snapshot` behaviour module.\r\n\r\nChange snapshot API to separate metadata (Index, Term and Servers) from the snapshot state.\r\n\r\nSnapshot lifetime:\r\n\r\n- Machine issues `{release_cursor, Index, State}`\r\n- If log module decides to take a snapshots it calls the `prepare` callback\r\n- `prepare` callback returns a reference to the data to be saved (can be the machine state or a mnesia checkpoint)\r\n- ra_snapshot_writer calls the `write` callback with the reference and metadata to save it to disk\r\n- when a leader sends a snapshot it reads the metadata and the opaque snapshot data using the `read` callback\r\n- when a follower receives the data it saves it to disk using the `save` callback\r\n- to create a machine state after `save` it calls `install`, which will restore the machine state from the data saved\r\n- when a node starts, it calls `recover` to read existing snapshot and restore the machine state.\r\n\r\n\r\n\r\n\r\n\r\n","created_at":"2018-10-30T14:51:48Z","updated_at":"2018-10-30T14:51:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rabbitmq/ra/pulls/25/commits","review_comments_url":"https://api.github.com/repos/rabbitmq/ra/pulls/25/comments","review_comment_url":"https://api.github.com/repos/rabbitmq/ra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rabbitmq/ra/issues/25/comments","statuses_url":"https://api.github.com/repos/rabbitmq/ra/statuses/4d9832f3ccad9eda07582282563c483230d2d34f","head":{"label":"rabbitmq:custom-snapshot","ref":"custom-snapshot","sha":"4d9832f3ccad9eda07582282563c483230d2d34f","user":{"login":"rabbitmq","id":96669,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk2NjY5","avatar_url":"https://avatars0.githubusercontent.com/u/96669?v=4","gravatar_id":"","url":"https://api.github.com/users/rabbitmq","html_url":"https://github.com/rabbitmq","followers_url":"https://api.github.com/users/rabbitmq/followers","following_url":"https://api.github.com/users/rabbitmq/following{/other_user}","gists_url":"https://api.github.com/users/rabbitmq/gists{/gist_id}","starred_url":"https://api.github.com/users/rabbitmq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rabbitmq/subscriptions","organizations_url":"https://api.github.com/users/rabbitmq/orgs","repos_url":"https://api.github.com/users/rabbitmq/repos","events_url":"https://api.github.com/users/rabbitmq/events{/privacy}","received_events_url":"https://api.github.com/users/rabbitmq/received_events","type":"Organization","site_admin":false},"repo":{"id":82831082,"node_id":"MDEwOlJlcG9zaXRvcnk4MjgzMTA4Mg==","name":"ra","full_name":"rabbitmq/ra","private":false,"owner":{"login":"rabbitmq","id":96669,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk2NjY5","avatar_url":"https://avatars0.githubusercontent.com/u/96669?v=4","gravatar_id":"","url":"https://api.github.com/users/rabbitmq","html_url":"https://github.com/rabbitmq","followers_url":"https://api.github.com/users/rabbitmq/followers","following_url":"https://api.github.com/users/rabbitmq/following{/other_user}","gists_url":"https://api.github.com/users/rabbitmq/gists{/gist_id}","starred_url":"https://api.github.com/users/rabbitmq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rabbitmq/subscriptions","organizations_url":"https://api.github.com/users/rabbitmq/orgs","repos_url":"https://api.github.com/users/rabbitmq/repos","events_url":"https://api.github.com/users/rabbitmq/events{/privacy}","received_events_url":"https://api.github.com/users/rabbitmq/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/rabbitmq/ra","description":"A Raft implementation for Erlang and Elixir that strives to be efficient and make it easier to use multiple Raft clusters in a single system.","fork":false,"url":"https://api.github.com/repos/rabbitmq/ra","forks_url":"https://api.github.com/repos/rabbitmq/ra/forks","keys_url":"https://api.github.com/repos/rabbitmq/ra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rabbitmq/ra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rabbitmq/ra/teams","hooks_url":"https://api.github.com/repos/rabbitmq/ra/hooks","issue_events_url":"https://api.github.com/repos/rabbitmq/ra/issues/events{/number}","events_url":"https://api.github.com/repos/rabbitmq/ra/events","assignees_url":"https://api.github.com/repos/rabbitmq/ra/assignees{/user}","branches_url":"https://api.github.com/repos/rabbitmq/ra/branches{/branch}","tags_url":"https://api.github.com/repos/rabbitmq/ra/tags","blobs_url":"https://api.github.com/repos/rabbitmq/ra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rabbitmq/ra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rabbitmq/ra/git/refs{/sha}","trees_url":"https://api.github.com/repos/rabbitmq/ra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rabbitmq/ra/statuses/{sha}","languages_url":"https://api.github.com/repos/rabbitmq/ra/languages","stargazers_url":"https://api.github.com/repos/rabbitmq/ra/stargazers","contributors_url":"https://api.github.com/repos/rabbitmq/ra/contributors","subscribers_url":"https://api.github.com/repos/rabbitmq/ra/subscribers","subscription_url":"https://api.github.com/repos/rabbitmq/ra/subscription","commits_url":"https://api.github.com/repos/rabbitmq/ra/commits{/sha}","git_commits_url":"https://api.github.com/repos/rabbitmq/ra/git/commits{/sha}","comments_url":"https://api.github.com/repos/rabbitmq/ra/comments{/number}","issue_comment_url":"https://api.github.com/repos/rabbitmq/ra/issues/comments{/number}","contents_url":"https://api.github.com/repos/rabbitmq/ra/contents/{+path}","compare_url":"https://api.github.com/repos/rabbitmq/ra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rabbitmq/ra/merges","archive_url":"https://api.github.com/repos/rabbitmq/ra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rabbitmq/ra/downloads","issues_url":"https://api.github.com/repos/rabbitmq/ra/issues{/number}","pulls_url":"https://api.github.com/repos/rabbitmq/ra/pulls{/number}","milestones_url":"https://api.github.com/repos/rabbitmq/ra/milestones{/number}","notifications_url":"https://api.github.com/repos/rabbitmq/ra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rabbitmq/ra/labels{/name}","releases_url":"https://api.github.com/repos/rabbitmq/ra/releases{/id}","deployments_url":"https://api.github.com/repos/rabbitmq/ra/deployments","created_at":"2017-02-22T17:07:57Z","updated_at":"2018-10-29T05:44:29Z","pushed_at":"2018-10-30T12:43:27Z","git_url":"git://github.com/rabbitmq/ra.git","ssh_url":"git@github.com:rabbitmq/ra.git","clone_url":"https://github.com/rabbitmq/ra.git","svn_url":"https://github.com/rabbitmq/ra","homepage":"","size":17277,"stargazers_count":190,"watchers_count":190,"language":"Erlang","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":23,"open_issues":7,"watchers":190,"default_branch":"master"}},"base":{"label":"rabbitmq:master","ref":"master","sha":"ab5edeced89c6a00fc44e5b77a0c55c0dfc422b6","user":{"login":"rabbitmq","id":96669,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk2NjY5","avatar_url":"https://avatars0.githubusercontent.com/u/96669?v=4","gravatar_id":"","url":"https://api.github.com/users/rabbitmq","html_url":"https://github.com/rabbitmq","followers_url":"https://api.github.com/users/rabbitmq/followers","following_url":"https://api.github.com/users/rabbitmq/following{/other_user}","gists_url":"https://api.github.com/users/rabbitmq/gists{/gist_id}","starred_url":"https://api.github.com/users/rabbitmq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rabbitmq/subscriptions","organizations_url":"https://api.github.com/users/rabbitmq/orgs","repos_url":"https://api.github.com/users/rabbitmq/repos","events_url":"https://api.github.com/users/rabbitmq/events{/privacy}","received_events_url":"https://api.github.com/users/rabbitmq/received_events","type":"Organization","site_admin":false},"repo":{"id":82831082,"node_id":"MDEwOlJlcG9zaXRvcnk4MjgzMTA4Mg==","name":"ra","full_name":"rabbitmq/ra","private":false,"owner":{"login":"rabbitmq","id":96669,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk2NjY5","avatar_url":"https://avatars0.githubusercontent.com/u/96669?v=4","gravatar_id":"","url":"https://api.github.com/users/rabbitmq","html_url":"https://github.com/rabbitmq","followers_url":"https://api.github.com/users/rabbitmq/followers","following_url":"https://api.github.com/users/rabbitmq/following{/other_user}","gists_url":"https://api.github.com/users/rabbitmq/gists{/gist_id}","starred_url":"https://api.github.com/users/rabbitmq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rabbitmq/subscriptions","organizations_url":"https://api.github.com/users/rabbitmq/orgs","repos_url":"https://api.github.com/users/rabbitmq/repos","events_url":"https://api.github.com/users/rabbitmq/events{/privacy}","received_events_url":"https://api.github.com/users/rabbitmq/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/rabbitmq/ra","description":"A Raft implementation for Erlang and Elixir that strives to be efficient and make it easier to use multiple Raft clusters in a single system.","fork":false,"url":"https://api.github.com/repos/rabbitmq/ra","forks_url":"https://api.github.com/repos/rabbitmq/ra/forks","keys_url":"https://api.github.com/repos/rabbitmq/ra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rabbitmq/ra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rabbitmq/ra/teams","hooks_url":"https://api.github.com/repos/rabbitmq/ra/hooks","issue_events_url":"https://api.github.com/repos/rabbitmq/ra/issues/events{/number}","events_url":"https://api.github.com/repos/rabbitmq/ra/events","assignees_url":"https://api.github.com/repos/rabbitmq/ra/assignees{/user}","branches_url":"https://api.github.com/repos/rabbitmq/ra/branches{/branch}","tags_url":"https://api.github.com/repos/rabbitmq/ra/tags","blobs_url":"https://api.github.com/repos/rabbitmq/ra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rabbitmq/ra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rabbitmq/ra/git/refs{/sha}","trees_url":"https://api.github.com/repos/rabbitmq/ra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rabbitmq/ra/statuses/{sha}","languages_url":"https://api.github.com/repos/rabbitmq/ra/languages","stargazers_url":"https://api.github.com/repos/rabbitmq/ra/stargazers","contributors_url":"https://api.github.com/repos/rabbitmq/ra/contributors","subscribers_url":"https://api.github.com/repos/rabbitmq/ra/subscribers","subscription_url":"https://api.github.com/repos/rabbitmq/ra/subscription","commits_url":"https://api.github.com/repos/rabbitmq/ra/commits{/sha}","git_commits_url":"https://api.github.com/repos/rabbitmq/ra/git/commits{/sha}","comments_url":"https://api.github.com/repos/rabbitmq/ra/comments{/number}","issue_comment_url":"https://api.github.com/repos/rabbitmq/ra/issues/comments{/number}","contents_url":"https://api.github.com/repos/rabbitmq/ra/contents/{+path}","compare_url":"https://api.github.com/repos/rabbitmq/ra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rabbitmq/ra/merges","archive_url":"https://api.github.com/repos/rabbitmq/ra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rabbitmq/ra/downloads","issues_url":"https://api.github.com/repos/rabbitmq/ra/issues{/number}","pulls_url":"https://api.github.com/repos/rabbitmq/ra/pulls{/number}","milestones_url":"https://api.github.com/repos/rabbitmq/ra/milestones{/number}","notifications_url":"https://api.github.com/repos/rabbitmq/ra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rabbitmq/ra/labels{/name}","releases_url":"https://api.github.com/repos/rabbitmq/ra/releases{/id}","deployments_url":"https://api.github.com/repos/rabbitmq/ra/deployments","created_at":"2017-02-22T17:07:57Z","updated_at":"2018-10-29T05:44:29Z","pushed_at":"2018-10-30T12:43:27Z","git_url":"git://github.com/rabbitmq/ra.git","ssh_url":"git@github.com:rabbitmq/ra.git","clone_url":"https://github.com/rabbitmq/ra.git","svn_url":"https://github.com/rabbitmq/ra","homepage":"","size":17277,"stargazers_count":190,"watchers_count":190,"language":"Erlang","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":23,"open_issues":7,"watchers":190,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rabbitmq/ra/pulls/25"},"html":{"href":"https://github.com/rabbitmq/ra/pull/25"},"issue":{"href":"https://api.github.com/repos/rabbitmq/ra/issues/25"},"comments":{"href":"https://api.github.com/repos/rabbitmq/ra/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/rabbitmq/ra/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/rabbitmq/ra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rabbitmq/ra/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/rabbitmq/ra/statuses/4d9832f3ccad9eda07582282563c483230d2d34f"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":8,"additions":286,"deletions":1107,"changed_files":24}}
{"actor":{"display_login":"hairyhum"}}