{"action":"created","issue":{"url":"https://api.github.com/repos/caskdata/cdap/issues/3683","labels_url":"https://api.github.com/repos/caskdata/cdap/issues/3683/labels{/name}","comments_url":"https://api.github.com/repos/caskdata/cdap/issues/3683/comments","events_url":"https://api.github.com/repos/caskdata/cdap/issues/3683/events","html_url":"https://github.com/caskdata/cdap/pull/3683","id":102914498,"number":3683,"title":"Fixes all race condition in Worker.stop() usage. Generally, stop() me…","user":{"login":"chtyim","id":885032,"avatar_url":"https://avatars.githubusercontent.com/u/885032?v=3","gravatar_id":"","url":"https://api.github.com/users/chtyim","html_url":"https://github.com/chtyim","followers_url":"https://api.github.com/users/chtyim/followers","following_url":"https://api.github.com/users/chtyim/following{/other_user}","gists_url":"https://api.github.com/users/chtyim/gists{/gist_id}","starred_url":"https://api.github.com/users/chtyim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chtyim/subscriptions","organizations_url":"https://api.github.com/users/chtyim/orgs","repos_url":"https://api.github.com/users/chtyim/repos","events_url":"https://api.github.com/users/chtyim/events{/privacy}","received_events_url":"https://api.github.com/users/chtyim/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/caskdata/cdap/labels/3.2","name":"3.2","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-24T23:38:57Z","updated_at":"2015-08-25T02:02:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/caskdata/cdap/pulls/3683","html_url":"https://github.com/caskdata/cdap/pull/3683","diff_url":"https://github.com/caskdata/cdap/pull/3683.diff","patch_url":"https://github.com/caskdata/cdap/pull/3683.patch"},"body":"…thod happens in different thread than the init(), run() and destroy() methods. In specifics:\r\n\r\n- Shouldn’t set running = true in the run() method and setting it to false in stop(). It is because it is possible that stop() get called from another thread which set the “running” to false, before run() is able to set it to true. If that happen, the Worker thread will be keep running forever.\r\n- Shouldn’t use getContext() from stop() because the context field is not volatile, and also it’s possible stop() is called from another thread which even before the initialize() is being invoked."},"comment":{"url":"https://api.github.com/repos/caskdata/cdap/issues/comments/134446188","html_url":"https://github.com/caskdata/cdap/pull/3683#issuecomment-134446188","issue_url":"https://api.github.com/repos/caskdata/cdap/issues/3683","id":134446188,"user":{"login":"chtyim","id":885032,"avatar_url":"https://avatars.githubusercontent.com/u/885032?v=3","gravatar_id":"","url":"https://api.github.com/users/chtyim","html_url":"https://github.com/chtyim","followers_url":"https://api.github.com/users/chtyim/followers","following_url":"https://api.github.com/users/chtyim/following{/other_user}","gists_url":"https://api.github.com/users/chtyim/gists{/gist_id}","starred_url":"https://api.github.com/users/chtyim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chtyim/subscriptions","organizations_url":"https://api.github.com/users/chtyim/orgs","repos_url":"https://api.github.com/users/chtyim/repos","events_url":"https://api.github.com/users/chtyim/events{/privacy}","received_events_url":"https://api.github.com/users/chtyim/received_events","type":"User","site_admin":false},"created_at":"2015-08-25T02:02:07Z","updated_at":"2015-08-25T02:02:07Z","body":"Build passed: http://builds.cask.co/browse/CDAP-DUT2597-1"}}