{"action":"created","issue":{"url":"https://api.github.com/repos/docker/swarm/issues/2032","repository_url":"https://api.github.com/repos/docker/swarm","labels_url":"https://api.github.com/repos/docker/swarm/issues/2032/labels{/name}","comments_url":"https://api.github.com/repos/docker/swarm/issues/2032/comments","events_url":"https://api.github.com/repos/docker/swarm/issues/2032/events","html_url":"https://github.com/docker/swarm/pull/2032","id":143682233,"number":2032,"title":"better mutex and rwmutex usage in cluster and engine","user":{"login":"allencloud","id":9465626,"avatar_url":"https://avatars.githubusercontent.com/u/9465626?v=3","gravatar_id":"","url":"https://api.github.com/users/allencloud","html_url":"https://github.com/allencloud","followers_url":"https://api.github.com/users/allencloud/followers","following_url":"https://api.github.com/users/allencloud/following{/other_user}","gists_url":"https://api.github.com/users/allencloud/gists{/gist_id}","starred_url":"https://api.github.com/users/allencloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allencloud/subscriptions","organizations_url":"https://api.github.com/users/allencloud/orgs","repos_url":"https://api.github.com/users/allencloud/repos","events_url":"https://api.github.com/users/allencloud/events{/privacy}","received_events_url":"https://api.github.com/users/allencloud/received_events","type":"User","site_admin":false},"labels":[{"id":207688457,"url":"https://api.github.com/repos/docker/swarm/labels/status/0-triage","name":"status/0-triage","color":"EEEEEE","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/docker/swarm/milestones/16","html_url":"https://github.com/docker/swarm/milestones/1.2.6","labels_url":"https://api.github.com/repos/docker/swarm/milestones/16/labels","id":1937879,"number":16,"title":"1.2.6","description":"","creator":{"login":"dongluochen","id":14985073,"avatar_url":"https://avatars.githubusercontent.com/u/14985073?v=3","gravatar_id":"","url":"https://api.github.com/users/dongluochen","html_url":"https://github.com/dongluochen","followers_url":"https://api.github.com/users/dongluochen/followers","following_url":"https://api.github.com/users/dongluochen/following{/other_user}","gists_url":"https://api.github.com/users/dongluochen/gists{/gist_id}","starred_url":"https://api.github.com/users/dongluochen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dongluochen/subscriptions","organizations_url":"https://api.github.com/users/dongluochen/orgs","repos_url":"https://api.github.com/users/dongluochen/repos","events_url":"https://api.github.com/users/dongluochen/events{/privacy}","received_events_url":"https://api.github.com/users/dongluochen/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":6,"state":"open","created_at":"2016-08-11T21:13:12Z","updated_at":"2016-12-01T00:22:57Z","due_on":"2017-01-10T00:00:00Z","closed_at":null},"comments":1,"created_at":"2016-03-26T09:23:34Z","updated_at":"2016-12-02T07:50:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/swarm/pulls/2032","html_url":"https://github.com/docker/swarm/pull/2032","diff_url":"https://github.com/docker/swarm/pull/2032.diff","patch_url":"https://github.com/docker/swarm/pull/2032.patch"},"body":" I find that struct `cluster(swarm)`,`cluster(mesos)`,`engine` use RWMutex.\nRWMutex does make data shared consistent.\nWhile, RWMutex is used in wrong way in some places.\n\nAnd I did some improvement in the usage of RWMutex:\n1. When reading data, RLock() should be used;\n2. When Writing data, Lock() should be used.\n\nThis pr changes a lot of the code involved.\n\nSigned-off-by: Sun Hongliang allen.sun@daocloud.io\n"},"comment":{"url":"https://api.github.com/repos/docker/swarm/issues/comments/264394355","html_url":"https://github.com/docker/swarm/pull/2032#issuecomment-264394355","issue_url":"https://api.github.com/repos/docker/swarm/issues/2032","id":264394355,"user":{"login":"allencloud","id":9465626,"avatar_url":"https://avatars.githubusercontent.com/u/9465626?v=3","gravatar_id":"","url":"https://api.github.com/users/allencloud","html_url":"https://github.com/allencloud","followers_url":"https://api.github.com/users/allencloud/followers","following_url":"https://api.github.com/users/allencloud/following{/other_user}","gists_url":"https://api.github.com/users/allencloud/gists{/gist_id}","starred_url":"https://api.github.com/users/allencloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allencloud/subscriptions","organizations_url":"https://api.github.com/users/allencloud/orgs","repos_url":"https://api.github.com/users/allencloud/repos","events_url":"https://api.github.com/users/allencloud/events{/privacy}","received_events_url":"https://api.github.com/users/allencloud/received_events","type":"User","site_admin":false},"created_at":"2016-12-02T07:50:18Z","updated_at":"2016-12-02T07:50:18Z","body":"Rebased. Thanks @nishanttotla  PTAL"}}
{"actor":{"display_login":"allencloud"}}