{"action":"created","comment":{"url":"https://api.github.com/repos/docker/swarmkit/pulls/comments/66817392","id":66817392,"diff_hunk":"@@ -91,6 +91,10 @@ type Node struct {\n \tremoved     uint32\n \tjoinAddr    string\n \n+\t// proposeLock must be held when keeping track of proposals.\n+\tproposeLock sync.Mutex\n+\tproposals   map[uint64]context.CancelFunc","path":"manager/state/raft/raft.go","position":6,"original_position":6,"commit_id":"e49060cda1e4b4474af04886a148ef5d913d58e8","original_commit_id":"e49060cda1e4b4474af04886a148ef5d913d58e8","user":{"login":"LK4D4","id":101445,"avatar_url":"https://avatars.githubusercontent.com/u/101445?v=3","gravatar_id":"","url":"https://api.github.com/users/LK4D4","html_url":"https://github.com/LK4D4","followers_url":"https://api.github.com/users/LK4D4/followers","following_url":"https://api.github.com/users/LK4D4/following{/other_user}","gists_url":"https://api.github.com/users/LK4D4/gists{/gist_id}","starred_url":"https://api.github.com/users/LK4D4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LK4D4/subscriptions","organizations_url":"https://api.github.com/users/LK4D4/orgs","repos_url":"https://api.github.com/users/LK4D4/repos","events_url":"https://api.github.com/users/LK4D4/events{/privacy}","received_events_url":"https://api.github.com/users/LK4D4/received_events","type":"User","site_admin":false},"body":"yup, +1","created_at":"2016-06-13T15:52:44Z","updated_at":"2016-06-13T15:52:44Z","html_url":"https://github.com/docker/swarmkit/pull/917#discussion_r66817392","pull_request_url":"https://api.github.com/repos/docker/swarmkit/pulls/917","_links":{"self":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/comments/66817392"},"html":{"href":"https://github.com/docker/swarmkit/pull/917#discussion_r66817392"},"pull_request":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/917"}}},"pull_request":{"url":"https://api.github.com/repos/docker/swarmkit/pulls/917","id":73451442,"html_url":"https://github.com/docker/swarmkit/pull/917","diff_url":"https://github.com/docker/swarmkit/pull/917.diff","patch_url":"https://github.com/docker/swarmkit/pull/917.patch","issue_url":"https://api.github.com/repos/docker/swarmkit/issues/917","number":917,"state":"open","locked":false,"title":"dispatcher, raft: cancel proposals on node shutdown","user":{"login":"abronan","id":1655859,"avatar_url":"https://avatars.githubusercontent.com/u/1655859?v=3","gravatar_id":"","url":"https://api.github.com/users/abronan","html_url":"https://github.com/abronan","followers_url":"https://api.github.com/users/abronan/followers","following_url":"https://api.github.com/users/abronan/following{/other_user}","gists_url":"https://api.github.com/users/abronan/gists{/gist_id}","starred_url":"https://api.github.com/users/abronan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abronan/subscriptions","organizations_url":"https://api.github.com/users/abronan/orgs","repos_url":"https://api.github.com/users/abronan/repos","events_url":"https://api.github.com/users/abronan/events{/privacy}","received_events_url":"https://api.github.com/users/abronan/received_events","type":"User","site_admin":false},"body":"This PR should fix the deadlock with the dispatcher on loss of quorum, this:\r\n- Removes `sync.WaitGroup` on dispatcher waiting for proposals to be completed\r\n- Keeps track of the proposals on the raft side and cancel the proposals on node shutdown\r\n\r\nThis impacts the dispatcher though as this will give:\r\n\r\n```\r\nERRO[0099] failed deregistering node after heartbeat expiration  error=failed to update node 3p7qdlm85il8a status to down: context canceled\r\n```\r\n\r\nMy guess is that this should be harmless as this should retry or recover on Manager(s) restart but I may be missing something so this is worth a careful review.\r\n\r\nPlease let me know if you have a better approach.\r\n\r\n/cc @LK4D4 @aaronlehmann @tonistiigi \r\n\r\nSigned-off-by: Alexandre Beslic <alexandre.beslic@gmail.com>","created_at":"2016-06-11T00:03:40Z","updated_at":"2016-06-13T15:52:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f520d15d1a404c236d2cd58166b8417badac8718","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/swarmkit/pulls/917/commits","review_comments_url":"https://api.github.com/repos/docker/swarmkit/pulls/917/comments","review_comment_url":"https://api.github.com/repos/docker/swarmkit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/swarmkit/issues/917/comments","statuses_url":"https://api.github.com/repos/docker/swarmkit/statuses/e49060cda1e4b4474af04886a148ef5d913d58e8","head":{"label":"abronan:clean_raft_proposals","ref":"clean_raft_proposals","sha":"e49060cda1e4b4474af04886a148ef5d913d58e8","user":{"login":"abronan","id":1655859,"avatar_url":"https://avatars.githubusercontent.com/u/1655859?v=3","gravatar_id":"","url":"https://api.github.com/users/abronan","html_url":"https://github.com/abronan","followers_url":"https://api.github.com/users/abronan/followers","following_url":"https://api.github.com/users/abronan/following{/other_user}","gists_url":"https://api.github.com/users/abronan/gists{/gist_id}","starred_url":"https://api.github.com/users/abronan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abronan/subscriptions","organizations_url":"https://api.github.com/users/abronan/orgs","repos_url":"https://api.github.com/users/abronan/repos","events_url":"https://api.github.com/users/abronan/events{/privacy}","received_events_url":"https://api.github.com/users/abronan/received_events","type":"User","site_admin":false},"repo":{"id":60663378,"name":"swarmkit","full_name":"abronan/swarmkit","owner":{"login":"abronan","id":1655859,"avatar_url":"https://avatars.githubusercontent.com/u/1655859?v=3","gravatar_id":"","url":"https://api.github.com/users/abronan","html_url":"https://github.com/abronan","followers_url":"https://api.github.com/users/abronan/followers","following_url":"https://api.github.com/users/abronan/following{/other_user}","gists_url":"https://api.github.com/users/abronan/gists{/gist_id}","starred_url":"https://api.github.com/users/abronan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abronan/subscriptions","organizations_url":"https://api.github.com/users/abronan/orgs","repos_url":"https://api.github.com/users/abronan/repos","events_url":"https://api.github.com/users/abronan/events{/privacy}","received_events_url":"https://api.github.com/users/abronan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abronan/swarmkit","description":"A toolkit for orchestrating distributed systems at any scale. It includes primitives for node discovery, raft-based consensus, task scheduling and more.","fork":true,"url":"https://api.github.com/repos/abronan/swarmkit","forks_url":"https://api.github.com/repos/abronan/swarmkit/forks","keys_url":"https://api.github.com/repos/abronan/swarmkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abronan/swarmkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abronan/swarmkit/teams","hooks_url":"https://api.github.com/repos/abronan/swarmkit/hooks","issue_events_url":"https://api.github.com/repos/abronan/swarmkit/issues/events{/number}","events_url":"https://api.github.com/repos/abronan/swarmkit/events","assignees_url":"https://api.github.com/repos/abronan/swarmkit/assignees{/user}","branches_url":"https://api.github.com/repos/abronan/swarmkit/branches{/branch}","tags_url":"https://api.github.com/repos/abronan/swarmkit/tags","blobs_url":"https://api.github.com/repos/abronan/swarmkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abronan/swarmkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abronan/swarmkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/abronan/swarmkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abronan/swarmkit/statuses/{sha}","languages_url":"https://api.github.com/repos/abronan/swarmkit/languages","stargazers_url":"https://api.github.com/repos/abronan/swarmkit/stargazers","contributors_url":"https://api.github.com/repos/abronan/swarmkit/contributors","subscribers_url":"https://api.github.com/repos/abronan/swarmkit/subscribers","subscription_url":"https://api.github.com/repos/abronan/swarmkit/subscription","commits_url":"https://api.github.com/repos/abronan/swarmkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/abronan/swarmkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/abronan/swarmkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/abronan/swarmkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/abronan/swarmkit/contents/{+path}","compare_url":"https://api.github.com/repos/abronan/swarmkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abronan/swarmkit/merges","archive_url":"https://api.github.com/repos/abronan/swarmkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abronan/swarmkit/downloads","issues_url":"https://api.github.com/repos/abronan/swarmkit/issues{/number}","pulls_url":"https://api.github.com/repos/abronan/swarmkit/pulls{/number}","milestones_url":"https://api.github.com/repos/abronan/swarmkit/milestones{/number}","notifications_url":"https://api.github.com/repos/abronan/swarmkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abronan/swarmkit/labels{/name}","releases_url":"https://api.github.com/repos/abronan/swarmkit/releases{/id}","deployments_url":"https://api.github.com/repos/abronan/swarmkit/deployments","created_at":"2016-06-08T02:50:52Z","updated_at":"2016-06-08T02:50:53Z","pushed_at":"2016-06-11T01:54:36Z","git_url":"git://github.com/abronan/swarmkit.git","ssh_url":"git@github.com:abronan/swarmkit.git","clone_url":"https://github.com/abronan/swarmkit.git","svn_url":"https://github.com/abronan/swarmkit","homepage":"","size":7306,"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":"docker:master","ref":"master","sha":"4212ef33bb905b7721da8b37cc1a24117857904f","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":51556828,"name":"swarmkit","full_name":"docker/swarmkit","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/swarmkit","description":"A toolkit for orchestrating distributed systems at any scale. It includes primitives for node discovery, raft-based consensus, task scheduling and more.","fork":false,"url":"https://api.github.com/repos/docker/swarmkit","forks_url":"https://api.github.com/repos/docker/swarmkit/forks","keys_url":"https://api.github.com/repos/docker/swarmkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/swarmkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/swarmkit/teams","hooks_url":"https://api.github.com/repos/docker/swarmkit/hooks","issue_events_url":"https://api.github.com/repos/docker/swarmkit/issues/events{/number}","events_url":"https://api.github.com/repos/docker/swarmkit/events","assignees_url":"https://api.github.com/repos/docker/swarmkit/assignees{/user}","branches_url":"https://api.github.com/repos/docker/swarmkit/branches{/branch}","tags_url":"https://api.github.com/repos/docker/swarmkit/tags","blobs_url":"https://api.github.com/repos/docker/swarmkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/swarmkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/swarmkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/swarmkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/swarmkit/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/swarmkit/languages","stargazers_url":"https://api.github.com/repos/docker/swarmkit/stargazers","contributors_url":"https://api.github.com/repos/docker/swarmkit/contributors","subscribers_url":"https://api.github.com/repos/docker/swarmkit/subscribers","subscription_url":"https://api.github.com/repos/docker/swarmkit/subscription","commits_url":"https://api.github.com/repos/docker/swarmkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/swarmkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/swarmkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/swarmkit/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/swarmkit/contents/{+path}","compare_url":"https://api.github.com/repos/docker/swarmkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/swarmkit/merges","archive_url":"https://api.github.com/repos/docker/swarmkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/swarmkit/downloads","issues_url":"https://api.github.com/repos/docker/swarmkit/issues{/number}","pulls_url":"https://api.github.com/repos/docker/swarmkit/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/swarmkit/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/swarmkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/swarmkit/labels{/name}","releases_url":"https://api.github.com/repos/docker/swarmkit/releases{/id}","deployments_url":"https://api.github.com/repos/docker/swarmkit/deployments","created_at":"2016-02-12T00:02:15Z","updated_at":"2016-06-13T15:45:48Z","pushed_at":"2016-06-13T14:43:23Z","git_url":"git://github.com/docker/swarmkit.git","ssh_url":"git@github.com:docker/swarmkit.git","clone_url":"https://github.com/docker/swarmkit.git","svn_url":"https://github.com/docker/swarmkit","homepage":"","size":17310,"stargazers_count":543,"watchers_count":543,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":71,"mirror_url":null,"open_issues_count":121,"forks":71,"open_issues":121,"watchers":543,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/917"},"html":{"href":"https://github.com/docker/swarmkit/pull/917"},"issue":{"href":"https://api.github.com/repos/docker/swarmkit/issues/917"},"comments":{"href":"https://api.github.com/repos/docker/swarmkit/issues/917/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/917/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/swarmkit/pulls/917/commits"},"statuses":{"href":"https://api.github.com/repos/docker/swarmkit/statuses/e49060cda1e4b4474af04886a148ef5d913d58e8"}}}}
{"actor":{"display_login":"LK4D4"}}