{"action":"created","issue":{"url":"https://api.github.com/repos/apache/kafka/issues/1738","repository_url":"https://api.github.com/repos/apache/kafka","labels_url":"https://api.github.com/repos/apache/kafka/issues/1738/labels{/name}","comments_url":"https://api.github.com/repos/apache/kafka/issues/1738/comments","events_url":"https://api.github.com/repos/apache/kafka/issues/1738/events","html_url":"https://github.com/apache/kafka/pull/1738","id":171100804,"number":1738,"title":"KAFKA-3994: Fix deadlock in Watchers by calling tryComplete without the lock","user":{"login":"hachikuji","id":12502538,"avatar_url":"https://avatars.githubusercontent.com/u/12502538?v=3","gravatar_id":"","url":"https://api.github.com/users/hachikuji","html_url":"https://github.com/hachikuji","followers_url":"https://api.github.com/users/hachikuji/followers","following_url":"https://api.github.com/users/hachikuji/following{/other_user}","gists_url":"https://api.github.com/users/hachikuji/gists{/gist_id}","starred_url":"https://api.github.com/users/hachikuji/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hachikuji/subscriptions","organizations_url":"https://api.github.com/users/hachikuji/orgs","repos_url":"https://api.github.com/users/hachikuji/repos","events_url":"https://api.github.com/users/hachikuji/events{/privacy}","received_events_url":"https://api.github.com/users/hachikuji/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-08-15T03:08:40Z","updated_at":"2016-10-08T00:03:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/1738","html_url":"https://github.com/apache/kafka/pull/1738","diff_url":"https://github.com/apache/kafka/pull/1738.diff","patch_url":"https://github.com/apache/kafka/pull/1738.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/apache/kafka/issues/comments/252387561","html_url":"https://github.com/apache/kafka/pull/1738#issuecomment-252387561","issue_url":"https://api.github.com/repos/apache/kafka/issues/1738","id":252387561,"user":{"login":"junrao","id":132330,"avatar_url":"https://avatars.githubusercontent.com/u/132330?v=3","gravatar_id":"","url":"https://api.github.com/users/junrao","html_url":"https://github.com/junrao","followers_url":"https://api.github.com/users/junrao/followers","following_url":"https://api.github.com/users/junrao/following{/other_user}","gists_url":"https://api.github.com/users/junrao/gists{/gist_id}","starred_url":"https://api.github.com/users/junrao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/junrao/subscriptions","organizations_url":"https://api.github.com/users/junrao/orgs","repos_url":"https://api.github.com/users/junrao/repos","events_url":"https://api.github.com/users/junrao/events{/privacy}","received_events_url":"https://api.github.com/users/junrao/received_events","type":"User","site_admin":false},"created_at":"2016-10-08T00:03:18Z","updated_at":"2016-10-08T00:03:18Z","body":"Another approach I was thinking is that the caller of tryCompleteElseWatch() shouldn't really need to hold any lock whiling calling it since the tryComplete thing is for async processing. In this particular case, we hold a group lock in GroupCoordinator.maybePrepareRebalance(), which will eventually call GroupCoordinator.tryCompleteJoin(), which acquires the group lock again. We could just release the group lock before calling GroupCoordinator.tryCompleteJoin().\r\n\r\nIn general, if we follow this protocol when using tryCompleteElseWatch(), we can avoid the deadlock w/o changing the watcher implementation."}}
{"actor":{"display_login":"junrao"}}