{"action":"created","comment":{"url":"https://api.github.com/repos/antirez/redis/pulls/comments/35888977","id":35888977,"diff_hunk":"@@ -4440,6 +4440,110 @@ void restoreCommand(client *c) {\n     server.dirty++;\n }\n \n+void prepareRollback(struct redisCommand *cmd, client *c) {","path":"src/cluster.c","position":4,"original_position":4,"commit_id":"9cc1e0e5dc703dcd03675c4db54307b2eba83c82","original_commit_id":"9cc1e0e5dc703dcd03675c4db54307b2eba83c82","user":{"login":"josiahcarlson","id":209346,"avatar_url":"https://avatars.githubusercontent.com/u/209346?v=3","gravatar_id":"","url":"https://api.github.com/users/josiahcarlson","html_url":"https://github.com/josiahcarlson","followers_url":"https://api.github.com/users/josiahcarlson/followers","following_url":"https://api.github.com/users/josiahcarlson/following{/other_user}","gists_url":"https://api.github.com/users/josiahcarlson/gists{/gist_id}","starred_url":"https://api.github.com/users/josiahcarlson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josiahcarlson/subscriptions","organizations_url":"https://api.github.com/users/josiahcarlson/orgs","repos_url":"https://api.github.com/users/josiahcarlson/repos","events_url":"https://api.github.com/users/josiahcarlson/events{/privacy}","received_events_url":"https://api.github.com/users/josiahcarlson/received_events","type":"User","site_admin":false},"body":"Two reasons:\r\n1. I didn't know where else to put it (so I am happy to move it)\r\n2. The current implementation is an automatic dump/restore\r\n3. Most of the guts of dump/restore are defined in cluster.c, implemented earlier in the file\r\n\r\nWhere should I move it?","created_at":"2015-07-30T16:18:16Z","updated_at":"2015-07-30T16:18:16Z","html_url":"https://github.com/antirez/redis/pull/2701#discussion_r35888977","pull_request_url":"https://api.github.com/repos/antirez/redis/pulls/2701","_links":{"self":{"href":"https://api.github.com/repos/antirez/redis/pulls/comments/35888977"},"html":{"href":"https://github.com/antirez/redis/pull/2701#discussion_r35888977"},"pull_request":{"href":"https://api.github.com/repos/antirez/redis/pulls/2701"}}},"pull_request":{"url":"https://api.github.com/repos/antirez/redis/pulls/2701","id":41092041,"html_url":"https://github.com/antirez/redis/pull/2701","diff_url":"https://github.com/antirez/redis/pull/2701.diff","patch_url":"https://github.com/antirez/redis/pull/2701.patch","issue_url":"https://api.github.com/repos/antirez/redis/issues/2701","number":2701,"state":"open","locked":false,"title":"Adds Lua transaction support","user":{"login":"josiahcarlson","id":209346,"avatar_url":"https://avatars.githubusercontent.com/u/209346?v=3","gravatar_id":"","url":"https://api.github.com/users/josiahcarlson","html_url":"https://github.com/josiahcarlson","followers_url":"https://api.github.com/users/josiahcarlson/followers","following_url":"https://api.github.com/users/josiahcarlson/following{/other_user}","gists_url":"https://api.github.com/users/josiahcarlson/gists{/gist_id}","starred_url":"https://api.github.com/users/josiahcarlson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josiahcarlson/subscriptions","organizations_url":"https://api.github.com/users/josiahcarlson/orgs","repos_url":"https://api.github.com/users/josiahcarlson/repos","events_url":"https://api.github.com/users/josiahcarlson/events{/privacy}","received_events_url":"https://api.github.com/users/josiahcarlson/received_events","type":"User","site_admin":false},"body":"Adds 2 commands: `EVALTXN` and `EVALSHATXN` - runs Lua scripts in a transaction\r\nAdds 1 script sub-comand: `SCRIPT ROLLBACK` - kills scripts that have written if they are execued as a transaction\r\nAdds 1 configuration option: `lua-all-transactions` - for specifying that all `EVAL`/`EVALSHA` should be transactions too","created_at":"2015-07-29T06:51:06Z","updated_at":"2015-07-30T16:18:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"262c8bb8e4240faf15489e6b4ef7d73509f7931b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/antirez/redis/pulls/2701/commits","review_comments_url":"https://api.github.com/repos/antirez/redis/pulls/2701/comments","review_comment_url":"https://api.github.com/repos/antirez/redis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/antirez/redis/issues/2701/comments","statuses_url":"https://api.github.com/repos/antirez/redis/statuses/9cc1e0e5dc703dcd03675c4db54307b2eba83c82","head":{"label":"josiahcarlson:lua-transactions","ref":"lua-transactions","sha":"9cc1e0e5dc703dcd03675c4db54307b2eba83c82","user":{"login":"josiahcarlson","id":209346,"avatar_url":"https://avatars.githubusercontent.com/u/209346?v=3","gravatar_id":"","url":"https://api.github.com/users/josiahcarlson","html_url":"https://github.com/josiahcarlson","followers_url":"https://api.github.com/users/josiahcarlson/followers","following_url":"https://api.github.com/users/josiahcarlson/following{/other_user}","gists_url":"https://api.github.com/users/josiahcarlson/gists{/gist_id}","starred_url":"https://api.github.com/users/josiahcarlson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josiahcarlson/subscriptions","organizations_url":"https://api.github.com/users/josiahcarlson/orgs","repos_url":"https://api.github.com/users/josiahcarlson/repos","events_url":"https://api.github.com/users/josiahcarlson/events{/privacy}","received_events_url":"https://api.github.com/users/josiahcarlson/received_events","type":"User","site_admin":false},"repo":{"id":26742203,"name":"redis","full_name":"josiahcarlson/redis","owner":{"login":"josiahcarlson","id":209346,"avatar_url":"https://avatars.githubusercontent.com/u/209346?v=3","gravatar_id":"","url":"https://api.github.com/users/josiahcarlson","html_url":"https://github.com/josiahcarlson","followers_url":"https://api.github.com/users/josiahcarlson/followers","following_url":"https://api.github.com/users/josiahcarlson/following{/other_user}","gists_url":"https://api.github.com/users/josiahcarlson/gists{/gist_id}","starred_url":"https://api.github.com/users/josiahcarlson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josiahcarlson/subscriptions","organizations_url":"https://api.github.com/users/josiahcarlson/orgs","repos_url":"https://api.github.com/users/josiahcarlson/repos","events_url":"https://api.github.com/users/josiahcarlson/events{/privacy}","received_events_url":"https://api.github.com/users/josiahcarlson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/josiahcarlson/redis","description":"Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes","fork":true,"url":"https://api.github.com/repos/josiahcarlson/redis","forks_url":"https://api.github.com/repos/josiahcarlson/redis/forks","keys_url":"https://api.github.com/repos/josiahcarlson/redis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/josiahcarlson/redis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/josiahcarlson/redis/teams","hooks_url":"https://api.github.com/repos/josiahcarlson/redis/hooks","issue_events_url":"https://api.github.com/repos/josiahcarlson/redis/issues/events{/number}","events_url":"https://api.github.com/repos/josiahcarlson/redis/events","assignees_url":"https://api.github.com/repos/josiahcarlson/redis/assignees{/user}","branches_url":"https://api.github.com/repos/josiahcarlson/redis/branches{/branch}","tags_url":"https://api.github.com/repos/josiahcarlson/redis/tags","blobs_url":"https://api.github.com/repos/josiahcarlson/redis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/josiahcarlson/redis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/josiahcarlson/redis/git/refs{/sha}","trees_url":"https://api.github.com/repos/josiahcarlson/redis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/josiahcarlson/redis/statuses/{sha}","languages_url":"https://api.github.com/repos/josiahcarlson/redis/languages","stargazers_url":"https://api.github.com/repos/josiahcarlson/redis/stargazers","contributors_url":"https://api.github.com/repos/josiahcarlson/redis/contributors","subscribers_url":"https://api.github.com/repos/josiahcarlson/redis/subscribers","subscription_url":"https://api.github.com/repos/josiahcarlson/redis/subscription","commits_url":"https://api.github.com/repos/josiahcarlson/redis/commits{/sha}","git_commits_url":"https://api.github.com/repos/josiahcarlson/redis/git/commits{/sha}","comments_url":"https://api.github.com/repos/josiahcarlson/redis/comments{/number}","issue_comment_url":"https://api.github.com/repos/josiahcarlson/redis/issues/comments{/number}","contents_url":"https://api.github.com/repos/josiahcarlson/redis/contents/{+path}","compare_url":"https://api.github.com/repos/josiahcarlson/redis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/josiahcarlson/redis/merges","archive_url":"https://api.github.com/repos/josiahcarlson/redis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/josiahcarlson/redis/downloads","issues_url":"https://api.github.com/repos/josiahcarlson/redis/issues{/number}","pulls_url":"https://api.github.com/repos/josiahcarlson/redis/pulls{/number}","milestones_url":"https://api.github.com/repos/josiahcarlson/redis/milestones{/number}","notifications_url":"https://api.github.com/repos/josiahcarlson/redis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/josiahcarlson/redis/labels{/name}","releases_url":"https://api.github.com/repos/josiahcarlson/redis/releases{/id}","created_at":"2014-11-17T05:53:39Z","updated_at":"2014-11-17T05:53:43Z","pushed_at":"2015-07-29T06:48:47Z","git_url":"git://github.com/josiahcarlson/redis.git","ssh_url":"git@github.com:josiahcarlson/redis.git","clone_url":"https://github.com/josiahcarlson/redis.git","svn_url":"https://github.com/josiahcarlson/redis","homepage":"http://redis.io","size":21216,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"unstable"}},"base":{"label":"antirez:unstable","ref":"unstable","sha":"3c8861a73af8a472053fc3c0b47452a2b6051d53","user":{"login":"antirez","id":65632,"avatar_url":"https://avatars.githubusercontent.com/u/65632?v=3","gravatar_id":"","url":"https://api.github.com/users/antirez","html_url":"https://github.com/antirez","followers_url":"https://api.github.com/users/antirez/followers","following_url":"https://api.github.com/users/antirez/following{/other_user}","gists_url":"https://api.github.com/users/antirez/gists{/gist_id}","starred_url":"https://api.github.com/users/antirez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antirez/subscriptions","organizations_url":"https://api.github.com/users/antirez/orgs","repos_url":"https://api.github.com/users/antirez/repos","events_url":"https://api.github.com/users/antirez/events{/privacy}","received_events_url":"https://api.github.com/users/antirez/received_events","type":"User","site_admin":false},"repo":{"id":156018,"name":"redis","full_name":"antirez/redis","owner":{"login":"antirez","id":65632,"avatar_url":"https://avatars.githubusercontent.com/u/65632?v=3","gravatar_id":"","url":"https://api.github.com/users/antirez","html_url":"https://github.com/antirez","followers_url":"https://api.github.com/users/antirez/followers","following_url":"https://api.github.com/users/antirez/following{/other_user}","gists_url":"https://api.github.com/users/antirez/gists{/gist_id}","starred_url":"https://api.github.com/users/antirez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antirez/subscriptions","organizations_url":"https://api.github.com/users/antirez/orgs","repos_url":"https://api.github.com/users/antirez/repos","events_url":"https://api.github.com/users/antirez/events{/privacy}","received_events_url":"https://api.github.com/users/antirez/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/antirez/redis","description":"Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes, HyperLogLogs, Bitmaps.","fork":false,"url":"https://api.github.com/repos/antirez/redis","forks_url":"https://api.github.com/repos/antirez/redis/forks","keys_url":"https://api.github.com/repos/antirez/redis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antirez/redis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antirez/redis/teams","hooks_url":"https://api.github.com/repos/antirez/redis/hooks","issue_events_url":"https://api.github.com/repos/antirez/redis/issues/events{/number}","events_url":"https://api.github.com/repos/antirez/redis/events","assignees_url":"https://api.github.com/repos/antirez/redis/assignees{/user}","branches_url":"https://api.github.com/repos/antirez/redis/branches{/branch}","tags_url":"https://api.github.com/repos/antirez/redis/tags","blobs_url":"https://api.github.com/repos/antirez/redis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antirez/redis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antirez/redis/git/refs{/sha}","trees_url":"https://api.github.com/repos/antirez/redis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antirez/redis/statuses/{sha}","languages_url":"https://api.github.com/repos/antirez/redis/languages","stargazers_url":"https://api.github.com/repos/antirez/redis/stargazers","contributors_url":"https://api.github.com/repos/antirez/redis/contributors","subscribers_url":"https://api.github.com/repos/antirez/redis/subscribers","subscription_url":"https://api.github.com/repos/antirez/redis/subscription","commits_url":"https://api.github.com/repos/antirez/redis/commits{/sha}","git_commits_url":"https://api.github.com/repos/antirez/redis/git/commits{/sha}","comments_url":"https://api.github.com/repos/antirez/redis/comments{/number}","issue_comment_url":"https://api.github.com/repos/antirez/redis/issues/comments{/number}","contents_url":"https://api.github.com/repos/antirez/redis/contents/{+path}","compare_url":"https://api.github.com/repos/antirez/redis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antirez/redis/merges","archive_url":"https://api.github.com/repos/antirez/redis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antirez/redis/downloads","issues_url":"https://api.github.com/repos/antirez/redis/issues{/number}","pulls_url":"https://api.github.com/repos/antirez/redis/pulls{/number}","milestones_url":"https://api.github.com/repos/antirez/redis/milestones{/number}","notifications_url":"https://api.github.com/repos/antirez/redis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antirez/redis/labels{/name}","releases_url":"https://api.github.com/repos/antirez/redis/releases{/id}","created_at":"2009-03-21T22:32:25Z","updated_at":"2015-07-30T16:17:36Z","pushed_at":"2015-07-29T10:30:11Z","git_url":"git://github.com/antirez/redis.git","ssh_url":"git@github.com:antirez/redis.git","clone_url":"https://github.com/antirez/redis.git","svn_url":"https://github.com/antirez/redis","homepage":"http://redis.io","size":177870,"stargazers_count":14354,"watchers_count":14354,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4757,"mirror_url":null,"open_issues_count":792,"forks":4757,"open_issues":792,"watchers":14354,"default_branch":"unstable"}},"_links":{"self":{"href":"https://api.github.com/repos/antirez/redis/pulls/2701"},"html":{"href":"https://github.com/antirez/redis/pull/2701"},"issue":{"href":"https://api.github.com/repos/antirez/redis/issues/2701"},"comments":{"href":"https://api.github.com/repos/antirez/redis/issues/2701/comments"},"review_comments":{"href":"https://api.github.com/repos/antirez/redis/pulls/2701/comments"},"review_comment":{"href":"https://api.github.com/repos/antirez/redis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/antirez/redis/pulls/2701/commits"},"statuses":{"href":"https://api.github.com/repos/antirez/redis/statuses/9cc1e0e5dc703dcd03675c4db54307b2eba83c82"}}}}