{"action":"created","comment":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/comments/32557447","id":32557447,"diff_hunk":"@@ -494,10 +494,12 @@ public long getLastBlockAccessTimeMs(long blockId) {\n    */\n   public long getLockedSizeBytes() {\n     long lockedBytes = 0;\n-    for (long blockId : mUserPerLockedBlock.keySet()) {\n-      Long blockSize = mBlockSizes.get(blockId);\n-      if (blockSize != null) {\n-        lockedBytes += blockSize;\n+    synchronized (mUserPerLockedBlock) {","path":"servers/src/main/java/tachyon/worker/tiered/StorageDir.java","position":8,"original_position":8,"commit_id":"5662fae77fedc2d14f0f48f19367d627c106043f","original_commit_id":"5662fae77fedc2d14f0f48f19367d627c106043f","user":{"login":"gpang","id":429032,"avatar_url":"https://avatars.githubusercontent.com/u/429032?v=3","gravatar_id":"","url":"https://api.github.com/users/gpang","html_url":"https://github.com/gpang","followers_url":"https://api.github.com/users/gpang/followers","following_url":"https://api.github.com/users/gpang/following{/other_user}","gists_url":"https://api.github.com/users/gpang/gists{/gist_id}","starred_url":"https://api.github.com/users/gpang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gpang/subscriptions","organizations_url":"https://api.github.com/users/gpang/orgs","repos_url":"https://api.github.com/users/gpang/repos","events_url":"https://api.github.com/users/gpang/events{/privacy}","received_events_url":"https://api.github.com/users/gpang/received_events","type":"User","site_admin":false},"body":"Is this the same \"lock\" that the internal methods of 'mUserPerLockedBlock' use? I am not familiar with Multimaps.synchronizedMultimap().","created_at":"2015-06-16T18:57:24Z","updated_at":"2015-06-16T18:57:24Z","html_url":"https://github.com/amplab/tachyon/pull/992#discussion_r32557447","pull_request_url":"https://api.github.com/repos/amplab/tachyon/pulls/992","_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments/32557447"},"html":{"href":"https://github.com/amplab/tachyon/pull/992#discussion_r32557447"},"pull_request":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/992"}}},"pull_request":{"url":"https://api.github.com/repos/amplab/tachyon/pulls/992","id":37760608,"html_url":"https://github.com/amplab/tachyon/pull/992","diff_url":"https://github.com/amplab/tachyon/pull/992.diff","patch_url":"https://github.com/amplab/tachyon/pull/992.patch","issue_url":"https://api.github.com/repos/amplab/tachyon/issues/992","number":992,"state":"open","locked":false,"title":"[TACHYON-507] Fix ConcurrentModificationException in StorageDir","user":{"login":"shimingfei","id":2638130,"avatar_url":"https://avatars.githubusercontent.com/u/2638130?v=3","gravatar_id":"","url":"https://api.github.com/users/shimingfei","html_url":"https://github.com/shimingfei","followers_url":"https://api.github.com/users/shimingfei/followers","following_url":"https://api.github.com/users/shimingfei/following{/other_user}","gists_url":"https://api.github.com/users/shimingfei/gists{/gist_id}","starred_url":"https://api.github.com/users/shimingfei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shimingfei/subscriptions","organizations_url":"https://api.github.com/users/shimingfei/orgs","repos_url":"https://api.github.com/users/shimingfei/repos","events_url":"https://api.github.com/users/shimingfei/events{/privacy}","received_events_url":"https://api.github.com/users/shimingfei/received_events","type":"User","site_admin":false},"body":"GetLockedBlockSize in StorageDir will iterate on mUserPerLockedBlock in StorageDir, but did not make it synchronized, during the iteration, the mUserPerLockedBlock may be changed in lockBlock/unlockBlock, and ConcurrentModificationException will be thrown.","created_at":"2015-06-16T05:22:25Z","updated_at":"2015-06-16T18:57:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5cfe3f004647a41b6c77ff2b51ef3ff01b290ba8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/amplab/tachyon/pulls/992/commits","review_comments_url":"https://api.github.com/repos/amplab/tachyon/pulls/992/comments","review_comment_url":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amplab/tachyon/issues/992/comments","statuses_url":"https://api.github.com/repos/amplab/tachyon/statuses/5662fae77fedc2d14f0f48f19367d627c106043f","head":{"label":"shimingfei:FixConcurrentModificationException","ref":"FixConcurrentModificationException","sha":"5662fae77fedc2d14f0f48f19367d627c106043f","user":{"login":"shimingfei","id":2638130,"avatar_url":"https://avatars.githubusercontent.com/u/2638130?v=3","gravatar_id":"","url":"https://api.github.com/users/shimingfei","html_url":"https://github.com/shimingfei","followers_url":"https://api.github.com/users/shimingfei/followers","following_url":"https://api.github.com/users/shimingfei/following{/other_user}","gists_url":"https://api.github.com/users/shimingfei/gists{/gist_id}","starred_url":"https://api.github.com/users/shimingfei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shimingfei/subscriptions","organizations_url":"https://api.github.com/users/shimingfei/orgs","repos_url":"https://api.github.com/users/shimingfei/repos","events_url":"https://api.github.com/users/shimingfei/events{/privacy}","received_events_url":"https://api.github.com/users/shimingfei/received_events","type":"User","site_admin":false},"repo":{"id":20919861,"name":"tachyon","full_name":"shimingfei/tachyon","owner":{"login":"shimingfei","id":2638130,"avatar_url":"https://avatars.githubusercontent.com/u/2638130?v=3","gravatar_id":"","url":"https://api.github.com/users/shimingfei","html_url":"https://github.com/shimingfei","followers_url":"https://api.github.com/users/shimingfei/followers","following_url":"https://api.github.com/users/shimingfei/following{/other_user}","gists_url":"https://api.github.com/users/shimingfei/gists{/gist_id}","starred_url":"https://api.github.com/users/shimingfei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shimingfei/subscriptions","organizations_url":"https://api.github.com/users/shimingfei/orgs","repos_url":"https://api.github.com/users/shimingfei/repos","events_url":"https://api.github.com/users/shimingfei/events{/privacy}","received_events_url":"https://api.github.com/users/shimingfei/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shimingfei/tachyon","description":"Memory-centric Storage System for Big Data Analytics","fork":true,"url":"https://api.github.com/repos/shimingfei/tachyon","forks_url":"https://api.github.com/repos/shimingfei/tachyon/forks","keys_url":"https://api.github.com/repos/shimingfei/tachyon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shimingfei/tachyon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shimingfei/tachyon/teams","hooks_url":"https://api.github.com/repos/shimingfei/tachyon/hooks","issue_events_url":"https://api.github.com/repos/shimingfei/tachyon/issues/events{/number}","events_url":"https://api.github.com/repos/shimingfei/tachyon/events","assignees_url":"https://api.github.com/repos/shimingfei/tachyon/assignees{/user}","branches_url":"https://api.github.com/repos/shimingfei/tachyon/branches{/branch}","tags_url":"https://api.github.com/repos/shimingfei/tachyon/tags","blobs_url":"https://api.github.com/repos/shimingfei/tachyon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shimingfei/tachyon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shimingfei/tachyon/git/refs{/sha}","trees_url":"https://api.github.com/repos/shimingfei/tachyon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shimingfei/tachyon/statuses/{sha}","languages_url":"https://api.github.com/repos/shimingfei/tachyon/languages","stargazers_url":"https://api.github.com/repos/shimingfei/tachyon/stargazers","contributors_url":"https://api.github.com/repos/shimingfei/tachyon/contributors","subscribers_url":"https://api.github.com/repos/shimingfei/tachyon/subscribers","subscription_url":"https://api.github.com/repos/shimingfei/tachyon/subscription","commits_url":"https://api.github.com/repos/shimingfei/tachyon/commits{/sha}","git_commits_url":"https://api.github.com/repos/shimingfei/tachyon/git/commits{/sha}","comments_url":"https://api.github.com/repos/shimingfei/tachyon/comments{/number}","issue_comment_url":"https://api.github.com/repos/shimingfei/tachyon/issues/comments{/number}","contents_url":"https://api.github.com/repos/shimingfei/tachyon/contents/{+path}","compare_url":"https://api.github.com/repos/shimingfei/tachyon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shimingfei/tachyon/merges","archive_url":"https://api.github.com/repos/shimingfei/tachyon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shimingfei/tachyon/downloads","issues_url":"https://api.github.com/repos/shimingfei/tachyon/issues{/number}","pulls_url":"https://api.github.com/repos/shimingfei/tachyon/pulls{/number}","milestones_url":"https://api.github.com/repos/shimingfei/tachyon/milestones{/number}","notifications_url":"https://api.github.com/repos/shimingfei/tachyon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shimingfei/tachyon/labels{/name}","releases_url":"https://api.github.com/repos/shimingfei/tachyon/releases{/id}","created_at":"2014-06-17T10:50:29Z","updated_at":"2015-04-01T18:43:36Z","pushed_at":"2015-06-16T05:29:42Z","git_url":"git://github.com/shimingfei/tachyon.git","ssh_url":"git@github.com:shimingfei/tachyon.git","clone_url":"https://github.com/shimingfei/tachyon.git","svn_url":"https://github.com/shimingfei/tachyon","homepage":"http://tachyon-project.org","size":14216,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"amplab:master","ref":"master","sha":"c6e54b2c378f528b276a030dbc1ef738bbad4596","user":{"login":"amplab","id":1438454,"avatar_url":"https://avatars.githubusercontent.com/u/1438454?v=3","gravatar_id":"","url":"https://api.github.com/users/amplab","html_url":"https://github.com/amplab","followers_url":"https://api.github.com/users/amplab/followers","following_url":"https://api.github.com/users/amplab/following{/other_user}","gists_url":"https://api.github.com/users/amplab/gists{/gist_id}","starred_url":"https://api.github.com/users/amplab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplab/subscriptions","organizations_url":"https://api.github.com/users/amplab/orgs","repos_url":"https://api.github.com/users/amplab/repos","events_url":"https://api.github.com/users/amplab/events{/privacy}","received_events_url":"https://api.github.com/users/amplab/received_events","type":"Organization","site_admin":false},"repo":{"id":7276954,"name":"tachyon","full_name":"amplab/tachyon","owner":{"login":"amplab","id":1438454,"avatar_url":"https://avatars.githubusercontent.com/u/1438454?v=3","gravatar_id":"","url":"https://api.github.com/users/amplab","html_url":"https://github.com/amplab","followers_url":"https://api.github.com/users/amplab/followers","following_url":"https://api.github.com/users/amplab/following{/other_user}","gists_url":"https://api.github.com/users/amplab/gists{/gist_id}","starred_url":"https://api.github.com/users/amplab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amplab/subscriptions","organizations_url":"https://api.github.com/users/amplab/orgs","repos_url":"https://api.github.com/users/amplab/repos","events_url":"https://api.github.com/users/amplab/events{/privacy}","received_events_url":"https://api.github.com/users/amplab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amplab/tachyon","description":" A Reliable Memory Centric Distributed Storage System","fork":false,"url":"https://api.github.com/repos/amplab/tachyon","forks_url":"https://api.github.com/repos/amplab/tachyon/forks","keys_url":"https://api.github.com/repos/amplab/tachyon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amplab/tachyon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amplab/tachyon/teams","hooks_url":"https://api.github.com/repos/amplab/tachyon/hooks","issue_events_url":"https://api.github.com/repos/amplab/tachyon/issues/events{/number}","events_url":"https://api.github.com/repos/amplab/tachyon/events","assignees_url":"https://api.github.com/repos/amplab/tachyon/assignees{/user}","branches_url":"https://api.github.com/repos/amplab/tachyon/branches{/branch}","tags_url":"https://api.github.com/repos/amplab/tachyon/tags","blobs_url":"https://api.github.com/repos/amplab/tachyon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amplab/tachyon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amplab/tachyon/git/refs{/sha}","trees_url":"https://api.github.com/repos/amplab/tachyon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amplab/tachyon/statuses/{sha}","languages_url":"https://api.github.com/repos/amplab/tachyon/languages","stargazers_url":"https://api.github.com/repos/amplab/tachyon/stargazers","contributors_url":"https://api.github.com/repos/amplab/tachyon/contributors","subscribers_url":"https://api.github.com/repos/amplab/tachyon/subscribers","subscription_url":"https://api.github.com/repos/amplab/tachyon/subscription","commits_url":"https://api.github.com/repos/amplab/tachyon/commits{/sha}","git_commits_url":"https://api.github.com/repos/amplab/tachyon/git/commits{/sha}","comments_url":"https://api.github.com/repos/amplab/tachyon/comments{/number}","issue_comment_url":"https://api.github.com/repos/amplab/tachyon/issues/comments{/number}","contents_url":"https://api.github.com/repos/amplab/tachyon/contents/{+path}","compare_url":"https://api.github.com/repos/amplab/tachyon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amplab/tachyon/merges","archive_url":"https://api.github.com/repos/amplab/tachyon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amplab/tachyon/downloads","issues_url":"https://api.github.com/repos/amplab/tachyon/issues{/number}","pulls_url":"https://api.github.com/repos/amplab/tachyon/pulls{/number}","milestones_url":"https://api.github.com/repos/amplab/tachyon/milestones{/number}","notifications_url":"https://api.github.com/repos/amplab/tachyon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amplab/tachyon/labels{/name}","releases_url":"https://api.github.com/repos/amplab/tachyon/releases{/id}","created_at":"2012-12-21T17:43:46Z","updated_at":"2015-06-16T13:07:40Z","pushed_at":"2015-06-16T18:41:24Z","git_url":"git://github.com/amplab/tachyon.git","ssh_url":"git@github.com:amplab/tachyon.git","clone_url":"https://github.com/amplab/tachyon.git","svn_url":"https://github.com/amplab/tachyon","homepage":"http://tachyon-project.org","size":32866,"stargazers_count":1441,"watchers_count":1441,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":525,"mirror_url":null,"open_issues_count":21,"forks":525,"open_issues":21,"watchers":1441,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/992"},"html":{"href":"https://github.com/amplab/tachyon/pull/992"},"issue":{"href":"https://api.github.com/repos/amplab/tachyon/issues/992"},"comments":{"href":"https://api.github.com/repos/amplab/tachyon/issues/992/comments"},"review_comments":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/992/comments"},"review_comment":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amplab/tachyon/pulls/992/commits"},"statuses":{"href":"https://api.github.com/repos/amplab/tachyon/statuses/5662fae77fedc2d14f0f48f19367d627c106043f"}}}}