{"action":"created","issue":{"url":"https://api.github.com/repos/amplab/tachyon/issues/1307","labels_url":"https://api.github.com/repos/amplab/tachyon/issues/1307/labels{/name}","comments_url":"https://api.github.com/repos/amplab/tachyon/issues/1307/comments","events_url":"https://api.github.com/repos/amplab/tachyon/issues/1307/events","html_url":"https://github.com/amplab/tachyon/pull/1307","id":101342304,"number":1307,"title":"[TACHYON-785] Move MasterClient into BlockWorker","user":{"login":"danielfree","id":126425,"avatar_url":"https://avatars.githubusercontent.com/u/126425?v=3","gravatar_id":"","url":"https://api.github.com/users/danielfree","html_url":"https://github.com/danielfree","followers_url":"https://api.github.com/users/danielfree/followers","following_url":"https://api.github.com/users/danielfree/following{/other_user}","gists_url":"https://api.github.com/users/danielfree/gists{/gist_id}","starred_url":"https://api.github.com/users/danielfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielfree/subscriptions","organizations_url":"https://api.github.com/users/danielfree/orgs","repos_url":"https://api.github.com/users/danielfree/repos","events_url":"https://api.github.com/users/danielfree/events{/privacy}","received_events_url":"https://api.github.com/users/danielfree/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-08-17T05:33:09Z","updated_at":"2015-08-19T05:40:33Z","closed_at":"2015-08-17T20:36:53Z","pull_request":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/1307","html_url":"https://github.com/amplab/tachyon/pull/1307","diff_url":"https://github.com/amplab/tachyon/pull/1307.diff","patch_url":"https://github.com/amplab/tachyon/pull/1307.patch"},"body":"JIRA: https://tachyon.atlassian.net/browse/TACHYON-785\r\n\r\nCurrent implementation creates three new MasterClient in BlockDataManager, BlockMasterSync, and PinListSync, which in turn creates three heartbeat threads inside MasterClient. A thread monitor on Worker can observe this behavior.\r\n\r\nThis PR moves MasterClient into BlockWorker and passes it to BlockManager, BlockMasterSync and PinListSync, avoiding redundant creation so the MasterClient heartbeat thread is limited to one."},"comment":{"url":"https://api.github.com/repos/amplab/tachyon/issues/comments/132452815","html_url":"https://github.com/amplab/tachyon/pull/1307#issuecomment-132452815","issue_url":"https://api.github.com/repos/amplab/tachyon/issues/1307","id":132452815,"user":{"login":"fanshiqing","id":3927162,"avatar_url":"https://avatars.githubusercontent.com/u/3927162?v=3","gravatar_id":"","url":"https://api.github.com/users/fanshiqing","html_url":"https://github.com/fanshiqing","followers_url":"https://api.github.com/users/fanshiqing/followers","following_url":"https://api.github.com/users/fanshiqing/following{/other_user}","gists_url":"https://api.github.com/users/fanshiqing/gists{/gist_id}","starred_url":"https://api.github.com/users/fanshiqing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fanshiqing/subscriptions","organizations_url":"https://api.github.com/users/fanshiqing/orgs","repos_url":"https://api.github.com/users/fanshiqing/repos","events_url":"https://api.github.com/users/fanshiqing/events{/privacy}","received_events_url":"https://api.github.com/users/fanshiqing/received_events","type":"User","site_admin":false},"created_at":"2015-08-19T05:40:33Z","updated_at":"2015-08-19T05:40:33Z","body":"Sorry for waking this PR up again, but this changes made `BlockMasterSync`, `PinListSync` and `BlockDataManager` just share **the same** `mMasterClient` to communicate with tachyon Master. Note that at present the `MasterClient`'s methods are all realized as `asynchronized`, so the three threads above just can't access the Master simultaneously. Whether underlying mutual exclusion between the three threads may cause problems, e.g., syncer timeout, need to be verified. Besides, naturally the syncers threads should be independent to each other, while here one thread's sync failure leads to the connection reset, which also risks the others' operations. Thanks for any discussions! @apc999 @calvinjia "}}