{"action":"closed","issue":{"url":"https://api.github.com/repos/dangdangdotcom/elastic-job/issues/61","repository_url":"https://api.github.com/repos/dangdangdotcom/elastic-job","labels_url":"https://api.github.com/repos/dangdangdotcom/elastic-job/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/dangdangdotcom/elastic-job/issues/61/comments","events_url":"https://api.github.com/repos/dangdangdotcom/elastic-job/issues/61/events","html_url":"https://github.com/dangdangdotcom/elastic-job/issues/61","id":139491768,"number":61,"title":"[Bug] 分片和主节点选举同时发生时，死锁问题解决","user":{"login":"terrymanu","id":5516298,"avatar_url":"https://avatars.githubusercontent.com/u/5516298?v=3","gravatar_id":"","url":"https://api.github.com/users/terrymanu","html_url":"https://github.com/terrymanu","followers_url":"https://api.github.com/users/terrymanu/followers","following_url":"https://api.github.com/users/terrymanu/following{/other_user}","gists_url":"https://api.github.com/users/terrymanu/gists{/gist_id}","starred_url":"https://api.github.com/users/terrymanu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terrymanu/subscriptions","organizations_url":"https://api.github.com/users/terrymanu/orgs","repos_url":"https://api.github.com/users/terrymanu/repos","events_url":"https://api.github.com/users/terrymanu/events{/privacy}","received_events_url":"https://api.github.com/users/terrymanu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-09T06:49:15Z","updated_at":"2016-03-09T06:51:42Z","closed_at":"2016-03-09T06:51:42Z","body":"分片和主节点选举同时发生时，可能发生死锁。\r\n\r\n1. 通过修正分片中条件判断改善多线程环境下分片锁死的可能性。\r\n2. 将分配分片步骤和清理分片标记步骤放入同一事务，保持数据完整性，并防止分片成功后分片标记未清理导致的死锁可能性。\r\n3. 将清理分片步骤放入同一事务，保持数据完整性。"}}