{"action":"created","issue":{"url":"https://api.github.com/repos/docker/swarmkit/issues/1179","repository_url":"https://api.github.com/repos/docker/swarmkit","labels_url":"https://api.github.com/repos/docker/swarmkit/issues/1179/labels{/name}","comments_url":"https://api.github.com/repos/docker/swarmkit/issues/1179/comments","events_url":"https://api.github.com/repos/docker/swarmkit/issues/1179/events","html_url":"https://github.com/docker/swarmkit/pull/1179","id":165840535,"number":1179,"title":"Raft: send commit ack back to follower before closing connection","user":{"login":"runshenzhu","id":7114218,"avatar_url":"https://avatars.githubusercontent.com/u/7114218?v=3","gravatar_id":"","url":"https://api.github.com/users/runshenzhu","html_url":"https://github.com/runshenzhu","followers_url":"https://api.github.com/users/runshenzhu/followers","following_url":"https://api.github.com/users/runshenzhu/following{/other_user}","gists_url":"https://api.github.com/users/runshenzhu/gists{/gist_id}","starred_url":"https://api.github.com/users/runshenzhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runshenzhu/subscriptions","organizations_url":"https://api.github.com/users/runshenzhu/orgs","repos_url":"https://api.github.com/users/runshenzhu/repos","events_url":"https://api.github.com/users/runshenzhu/events{/privacy}","received_events_url":"https://api.github.com/users/runshenzhu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/swarmkit/labels/area/raft","name":"area/raft","color":"fef2c0"},{"url":"https://api.github.com/repos/docker/swarmkit/labels/status/2-code-review","name":"status/2-code-review","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-07-15T17:40:48Z","updated_at":"2016-07-16T04:18:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/swarmkit/pulls/1179","html_url":"https://github.com/docker/swarmkit/pull/1179","diff_url":"https://github.com/docker/swarmkit/pull/1179.diff","patch_url":"https://github.com/docker/swarmkit/pull/1179.patch"},"body":"if there are only 2 nodes in the cluster, and leader is leaving before closing the connection, leader has to ensure that follower gets noticed about this raft conf change commit. \r\n\r\nOtherwise, follower would assume there are still 2 nodes in the cluster and won't get elected into the leader by acquiring the majority (2 nodes). Check out [my repo](https://github.com/runshenzhu/swarmkit/commits/raft-leave-join) to reproduce this bug.\r\n\r\nThis PR fix the problem by sending commit ack back to follower manually, before leader closing connection.\r\n\r\nAn alternative approach is to keep leader from leaving when there are only 2 nodes in the cluster.\r\n\r\nSigned-off-by: Runshen Zhu <runshen.zhu@gmail.com>\r\n\r\nping: @dperny @aaronlehmann @abronan \r\nfix #1178 "},"comment":{"url":"https://api.github.com/repos/docker/swarmkit/issues/comments/233107164","html_url":"https://github.com/docker/swarmkit/pull/1179#issuecomment-233107164","issue_url":"https://api.github.com/repos/docker/swarmkit/issues/1179","id":233107164,"user":{"login":"aaronlehmann","id":10601430,"avatar_url":"https://avatars.githubusercontent.com/u/10601430?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronlehmann","html_url":"https://github.com/aaronlehmann","followers_url":"https://api.github.com/users/aaronlehmann/followers","following_url":"https://api.github.com/users/aaronlehmann/following{/other_user}","gists_url":"https://api.github.com/users/aaronlehmann/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronlehmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronlehmann/subscriptions","organizations_url":"https://api.github.com/users/aaronlehmann/orgs","repos_url":"https://api.github.com/users/aaronlehmann/repos","events_url":"https://api.github.com/users/aaronlehmann/events{/privacy}","received_events_url":"https://api.github.com/users/aaronlehmann/received_events","type":"User","site_admin":false},"created_at":"2016-07-16T04:18:46Z","updated_at":"2016-07-16T04:18:46Z","body":"LGTM if it passes your tests"}}
{"actor":{"display_login":"aaronlehmann"}}