{"action":"created","comment":{"url":"https://api.github.com/repos/apache/kafka/pulls/comments/76483385","id":76483385,"diff_hunk":"@@ -573,11 +562,13 @@ public Void call() throws Exception {\n                     return null;\n                 }\n \n-                if (worker.ownsConnector(connName)) {\n+                if (assignment.connectors().contains(connName)) {\n                     try {\n                         worker.stopConnector(connName);\n-                        startConnector(connName);\n-                        callback.onCompletion(null, null);\n+                        if (startConnector(connName))","path":"connect/runtime/src/main/java/org/apache/kafka/connect/runtime/distributed/DistributedHerder.java","position":57,"original_position":57,"commit_id":"acfb4fb154dc56beb14b2ef485f7dcaa239e78f5","original_commit_id":"acfb4fb154dc56beb14b2ef485f7dcaa239e78f5","user":{"login":"shikhar","id":74267,"avatar_url":"https://avatars.githubusercontent.com/u/74267?v=3","gravatar_id":"","url":"https://api.github.com/users/shikhar","html_url":"https://github.com/shikhar","followers_url":"https://api.github.com/users/shikhar/followers","following_url":"https://api.github.com/users/shikhar/following{/other_user}","gists_url":"https://api.github.com/users/shikhar/gists{/gist_id}","starred_url":"https://api.github.com/users/shikhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shikhar/subscriptions","organizations_url":"https://api.github.com/users/shikhar/orgs","repos_url":"https://api.github.com/users/shikhar/repos","events_url":"https://api.github.com/users/shikhar/events{/privacy}","received_events_url":"https://api.github.com/users/shikhar/received_events","type":"User","site_admin":false},"body":"@ewencp in the REST request handling bits, it's checking the retval and throwing an error so it propagates up in the REST response.\r\n\r\n`processConnectorConfigUpdates` is called via the herder thread's `tick()` so we don't want to propagate errors up, and exceptions are being logged by `WorkerConnector.startConnector()` so there isn't any need to check the retval there.","created_at":"2016-08-26T20:31:23Z","updated_at":"2016-08-26T20:31:23Z","html_url":"https://github.com/apache/kafka/pull/1778#discussion_r76483385","pull_request_url":"https://api.github.com/repos/apache/kafka/pulls/1778","_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments/76483385"},"html":{"href":"https://github.com/apache/kafka/pull/1778#discussion_r76483385"},"pull_request":{"href":"https://api.github.com/repos/apache/kafka/pulls/1778"}}},"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/1778","id":82495770,"html_url":"https://github.com/apache/kafka/pull/1778","diff_url":"https://github.com/apache/kafka/pull/1778.diff","patch_url":"https://github.com/apache/kafka/pull/1778.patch","issue_url":"https://api.github.com/repos/apache/kafka/issues/1778","number":1778,"state":"open","locked":false,"title":"KAFKA-4042: Contain connector & task start/stop failures within the Worker","user":{"login":"shikhar","id":74267,"avatar_url":"https://avatars.githubusercontent.com/u/74267?v=3","gravatar_id":"","url":"https://api.github.com/users/shikhar","html_url":"https://github.com/shikhar","followers_url":"https://api.github.com/users/shikhar/followers","following_url":"https://api.github.com/users/shikhar/following{/other_user}","gists_url":"https://api.github.com/users/shikhar/gists{/gist_id}","starred_url":"https://api.github.com/users/shikhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shikhar/subscriptions","organizations_url":"https://api.github.com/users/shikhar/orgs","repos_url":"https://api.github.com/users/shikhar/repos","events_url":"https://api.github.com/users/shikhar/events{/privacy}","received_events_url":"https://api.github.com/users/shikhar/received_events","type":"User","site_admin":false},"body":"Invoke the statusListener.onFailure() callback on start failures so that the statusBackingStore is updated. This involved a fix to the putSafe() functionality which prevented any update that was not preceded by a (non-safe) put() from completing, so here when a connector or task is transitioning directly to FAILED.\r\n\r\nWorker start methods can still throw if the same connector name or task ID is already registered with the worker, as this condition should not happen.","created_at":"2016-08-24T07:44:45Z","updated_at":"2016-08-26T20:31:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"814de79d1e6931281c86e7fd109456ebe47d2cf9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/kafka/pulls/1778/commits","review_comments_url":"https://api.github.com/repos/apache/kafka/pulls/1778/comments","review_comment_url":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/kafka/issues/1778/comments","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/acfb4fb154dc56beb14b2ef485f7dcaa239e78f5","head":{"label":"shikhar:distherder-stayup-take4","ref":"distherder-stayup-take4","sha":"acfb4fb154dc56beb14b2ef485f7dcaa239e78f5","user":{"login":"shikhar","id":74267,"avatar_url":"https://avatars.githubusercontent.com/u/74267?v=3","gravatar_id":"","url":"https://api.github.com/users/shikhar","html_url":"https://github.com/shikhar","followers_url":"https://api.github.com/users/shikhar/followers","following_url":"https://api.github.com/users/shikhar/following{/other_user}","gists_url":"https://api.github.com/users/shikhar/gists{/gist_id}","starred_url":"https://api.github.com/users/shikhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shikhar/subscriptions","organizations_url":"https://api.github.com/users/shikhar/orgs","repos_url":"https://api.github.com/users/shikhar/repos","events_url":"https://api.github.com/users/shikhar/events{/privacy}","received_events_url":"https://api.github.com/users/shikhar/received_events","type":"User","site_admin":false},"repo":{"id":59165469,"name":"kafka","full_name":"shikhar/kafka","owner":{"login":"shikhar","id":74267,"avatar_url":"https://avatars.githubusercontent.com/u/74267?v=3","gravatar_id":"","url":"https://api.github.com/users/shikhar","html_url":"https://github.com/shikhar","followers_url":"https://api.github.com/users/shikhar/followers","following_url":"https://api.github.com/users/shikhar/following{/other_user}","gists_url":"https://api.github.com/users/shikhar/gists{/gist_id}","starred_url":"https://api.github.com/users/shikhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shikhar/subscriptions","organizations_url":"https://api.github.com/users/shikhar/orgs","repos_url":"https://api.github.com/users/shikhar/repos","events_url":"https://api.github.com/users/shikhar/events{/privacy}","received_events_url":"https://api.github.com/users/shikhar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shikhar/kafka","description":"Mirror of Apache Kafka","fork":true,"url":"https://api.github.com/repos/shikhar/kafka","forks_url":"https://api.github.com/repos/shikhar/kafka/forks","keys_url":"https://api.github.com/repos/shikhar/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shikhar/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shikhar/kafka/teams","hooks_url":"https://api.github.com/repos/shikhar/kafka/hooks","issue_events_url":"https://api.github.com/repos/shikhar/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/shikhar/kafka/events","assignees_url":"https://api.github.com/repos/shikhar/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/shikhar/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/shikhar/kafka/tags","blobs_url":"https://api.github.com/repos/shikhar/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shikhar/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shikhar/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/shikhar/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shikhar/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/shikhar/kafka/languages","stargazers_url":"https://api.github.com/repos/shikhar/kafka/stargazers","contributors_url":"https://api.github.com/repos/shikhar/kafka/contributors","subscribers_url":"https://api.github.com/repos/shikhar/kafka/subscribers","subscription_url":"https://api.github.com/repos/shikhar/kafka/subscription","commits_url":"https://api.github.com/repos/shikhar/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/shikhar/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/shikhar/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/shikhar/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/shikhar/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/shikhar/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shikhar/kafka/merges","archive_url":"https://api.github.com/repos/shikhar/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shikhar/kafka/downloads","issues_url":"https://api.github.com/repos/shikhar/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/shikhar/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/shikhar/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/shikhar/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shikhar/kafka/labels{/name}","releases_url":"https://api.github.com/repos/shikhar/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/shikhar/kafka/deployments","created_at":"2016-05-19T01:58:21Z","updated_at":"2016-05-19T01:58:25Z","pushed_at":"2016-08-26T19:19:16Z","git_url":"git://github.com/shikhar/kafka.git","ssh_url":"git@github.com:shikhar/kafka.git","clone_url":"https://github.com/shikhar/kafka.git","svn_url":"https://github.com/shikhar/kafka","homepage":null,"size":32323,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"trunk"}},"base":{"label":"apache:trunk","ref":"trunk","sha":"7a877895a1c8494d48bf2c18e2f74fb913ed036a","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":2211243,"name":"kafka","full_name":"apache/kafka","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/kafka","description":"Mirror of Apache Kafka","fork":false,"url":"https://api.github.com/repos/apache/kafka","forks_url":"https://api.github.com/repos/apache/kafka/forks","keys_url":"https://api.github.com/repos/apache/kafka/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/kafka/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/kafka/teams","hooks_url":"https://api.github.com/repos/apache/kafka/hooks","issue_events_url":"https://api.github.com/repos/apache/kafka/issues/events{/number}","events_url":"https://api.github.com/repos/apache/kafka/events","assignees_url":"https://api.github.com/repos/apache/kafka/assignees{/user}","branches_url":"https://api.github.com/repos/apache/kafka/branches{/branch}","tags_url":"https://api.github.com/repos/apache/kafka/tags","blobs_url":"https://api.github.com/repos/apache/kafka/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/kafka/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/kafka/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/kafka/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/kafka/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/kafka/languages","stargazers_url":"https://api.github.com/repos/apache/kafka/stargazers","contributors_url":"https://api.github.com/repos/apache/kafka/contributors","subscribers_url":"https://api.github.com/repos/apache/kafka/subscribers","subscription_url":"https://api.github.com/repos/apache/kafka/subscription","commits_url":"https://api.github.com/repos/apache/kafka/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/kafka/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/kafka/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/kafka/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/kafka/contents/{+path}","compare_url":"https://api.github.com/repos/apache/kafka/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/kafka/merges","archive_url":"https://api.github.com/repos/apache/kafka/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/kafka/downloads","issues_url":"https://api.github.com/repos/apache/kafka/issues{/number}","pulls_url":"https://api.github.com/repos/apache/kafka/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/kafka/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/kafka/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/kafka/labels{/name}","releases_url":"https://api.github.com/repos/apache/kafka/releases{/id}","deployments_url":"https://api.github.com/repos/apache/kafka/deployments","created_at":"2011-08-15T18:06:16Z","updated_at":"2016-08-26T10:22:21Z","pushed_at":"2016-08-26T19:40:36Z","git_url":"git://github.com/apache/kafka.git","ssh_url":"git@github.com:apache/kafka.git","clone_url":"https://github.com/apache/kafka.git","svn_url":"https://github.com/apache/kafka","homepage":null,"size":46466,"stargazers_count":3671,"watchers_count":3671,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2270,"mirror_url":"git://git.apache.org/kafka.git","open_issues_count":234,"forks":2270,"open_issues":234,"watchers":3671,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/kafka/pulls/1778"},"html":{"href":"https://github.com/apache/kafka/pull/1778"},"issue":{"href":"https://api.github.com/repos/apache/kafka/issues/1778"},"comments":{"href":"https://api.github.com/repos/apache/kafka/issues/1778/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/kafka/pulls/1778/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/kafka/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/kafka/pulls/1778/commits"},"statuses":{"href":"https://api.github.com/repos/apache/kafka/statuses/acfb4fb154dc56beb14b2ef485f7dcaa239e78f5"}}}}
{"actor":{"display_login":"shikhar"}}