{"action":"created","comment":{"url":"https://api.github.com/repos/bluebore/bfs/pulls/comments/58478873","id":58478873,"diff_hunk":"@@ -337,10 +336,11 @@ bool BlockManager::RemoveBlock(int64_t block_id) {\n             block_id, file_path.c_str());\n     }\n \n-    char dir_name[5];\n-    snprintf(dir_name, sizeof(dir_name), \"/%03ld\", block_id % 1000);\n+    //char dir_name[5];\n+    //snprintf(dir_name, sizeof(dir_name), \"/%03ld\", block_id % 1000);\n     // Rmdir, ignore error when not empty.\n     // rmdir((GetStorePath(block_id) + dir_name).c_str());\n+    bool meta_removed = RemoveBlockMeta(block_id);","path":"src/chunkserver/block_manager.cc","position":18,"original_position":18,"commit_id":"c9751f61e22bca582b31d71247772d72bbc869fd","original_commit_id":"c9751f61e22bca582b31d71247772d72bbc869fd","user":{"login":"yvxiang","id":1382038,"avatar_url":"https://avatars.githubusercontent.com/u/1382038?v=3","gravatar_id":"","url":"https://api.github.com/users/yvxiang","html_url":"https://github.com/yvxiang","followers_url":"https://api.github.com/users/yvxiang/followers","following_url":"https://api.github.com/users/yvxiang/following{/other_user}","gists_url":"https://api.github.com/users/yvxiang/gists{/gist_id}","starred_url":"https://api.github.com/users/yvxiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yvxiang/subscriptions","organizations_url":"https://api.github.com/users/yvxiang/orgs","repos_url":"https://api.github.com/users/yvxiang/repos","events_url":"https://api.github.com/users/yvxiang/events{/privacy}","received_events_url":"https://api.github.com/users/yvxiang/received_events","type":"User","site_admin":false},"body":"导致pull到实际上并不存在的文件？","created_at":"2016-04-05T02:22:29Z","updated_at":"2016-04-05T02:22:29Z","html_url":"https://github.com/bluebore/bfs/pull/255#discussion_r58478873","pull_request_url":"https://api.github.com/repos/bluebore/bfs/pulls/255","_links":{"self":{"href":"https://api.github.com/repos/bluebore/bfs/pulls/comments/58478873"},"html":{"href":"https://github.com/bluebore/bfs/pull/255#discussion_r58478873"},"pull_request":{"href":"https://api.github.com/repos/bluebore/bfs/pulls/255"}}},"pull_request":{"url":"https://api.github.com/repos/bluebore/bfs/pulls/255","id":65241611,"html_url":"https://github.com/bluebore/bfs/pull/255","diff_url":"https://github.com/bluebore/bfs/pull/255.diff","patch_url":"https://github.com/bluebore/bfs/pull/255.patch","issue_url":"https://api.github.com/repos/bluebore/bfs/issues/255","number":255,"state":"open","locked":false,"title":"Remove block meta after data file removed","user":{"login":"yvxiang","id":1382038,"avatar_url":"https://avatars.githubusercontent.com/u/1382038?v=3","gravatar_id":"","url":"https://api.github.com/users/yvxiang","html_url":"https://github.com/yvxiang","followers_url":"https://api.github.com/users/yvxiang/followers","following_url":"https://api.github.com/users/yvxiang/following{/other_user}","gists_url":"https://api.github.com/users/yvxiang/gists{/gist_id}","starred_url":"https://api.github.com/users/yvxiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yvxiang/subscriptions","organizations_url":"https://api.github.com/users/yvxiang/orgs","repos_url":"https://api.github.com/users/yvxiang/repos","events_url":"https://api.github.com/users/yvxiang/events{/privacy}","received_events_url":"https://api.github.com/users/yvxiang/received_events","type":"User","site_admin":false},"body":"先删元数据的话，如果元数据删完cs挂了，那么后面实际的数据文件就没法删了。","created_at":"2016-04-05T02:14:45Z","updated_at":"2016-04-05T02:22:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8bd3d608ec88b88c8dd17ba71f55698f62c65c41","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bluebore/bfs/pulls/255/commits","review_comments_url":"https://api.github.com/repos/bluebore/bfs/pulls/255/comments","review_comment_url":"https://api.github.com/repos/bluebore/bfs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bluebore/bfs/issues/255/comments","statuses_url":"https://api.github.com/repos/bluebore/bfs/statuses/c9751f61e22bca582b31d71247772d72bbc869fd","head":{"label":"yvxiang:fix_remove","ref":"fix_remove","sha":"c9751f61e22bca582b31d71247772d72bbc869fd","user":{"login":"yvxiang","id":1382038,"avatar_url":"https://avatars.githubusercontent.com/u/1382038?v=3","gravatar_id":"","url":"https://api.github.com/users/yvxiang","html_url":"https://github.com/yvxiang","followers_url":"https://api.github.com/users/yvxiang/followers","following_url":"https://api.github.com/users/yvxiang/following{/other_user}","gists_url":"https://api.github.com/users/yvxiang/gists{/gist_id}","starred_url":"https://api.github.com/users/yvxiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yvxiang/subscriptions","organizations_url":"https://api.github.com/users/yvxiang/orgs","repos_url":"https://api.github.com/users/yvxiang/repos","events_url":"https://api.github.com/users/yvxiang/events{/privacy}","received_events_url":"https://api.github.com/users/yvxiang/received_events","type":"User","site_admin":false},"repo":{"id":32985190,"name":"dfs","full_name":"yvxiang/dfs","owner":{"login":"yvxiang","id":1382038,"avatar_url":"https://avatars.githubusercontent.com/u/1382038?v=3","gravatar_id":"","url":"https://api.github.com/users/yvxiang","html_url":"https://github.com/yvxiang","followers_url":"https://api.github.com/users/yvxiang/followers","following_url":"https://api.github.com/users/yvxiang/following{/other_user}","gists_url":"https://api.github.com/users/yvxiang/gists{/gist_id}","starred_url":"https://api.github.com/users/yvxiang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yvxiang/subscriptions","organizations_url":"https://api.github.com/users/yvxiang/orgs","repos_url":"https://api.github.com/users/yvxiang/repos","events_url":"https://api.github.com/users/yvxiang/events{/privacy}","received_events_url":"https://api.github.com/users/yvxiang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yvxiang/dfs","description":"突然想写个分布式文件系统~","fork":true,"url":"https://api.github.com/repos/yvxiang/dfs","forks_url":"https://api.github.com/repos/yvxiang/dfs/forks","keys_url":"https://api.github.com/repos/yvxiang/dfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yvxiang/dfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yvxiang/dfs/teams","hooks_url":"https://api.github.com/repos/yvxiang/dfs/hooks","issue_events_url":"https://api.github.com/repos/yvxiang/dfs/issues/events{/number}","events_url":"https://api.github.com/repos/yvxiang/dfs/events","assignees_url":"https://api.github.com/repos/yvxiang/dfs/assignees{/user}","branches_url":"https://api.github.com/repos/yvxiang/dfs/branches{/branch}","tags_url":"https://api.github.com/repos/yvxiang/dfs/tags","blobs_url":"https://api.github.com/repos/yvxiang/dfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yvxiang/dfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yvxiang/dfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/yvxiang/dfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yvxiang/dfs/statuses/{sha}","languages_url":"https://api.github.com/repos/yvxiang/dfs/languages","stargazers_url":"https://api.github.com/repos/yvxiang/dfs/stargazers","contributors_url":"https://api.github.com/repos/yvxiang/dfs/contributors","subscribers_url":"https://api.github.com/repos/yvxiang/dfs/subscribers","subscription_url":"https://api.github.com/repos/yvxiang/dfs/subscription","commits_url":"https://api.github.com/repos/yvxiang/dfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/yvxiang/dfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/yvxiang/dfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/yvxiang/dfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/yvxiang/dfs/contents/{+path}","compare_url":"https://api.github.com/repos/yvxiang/dfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yvxiang/dfs/merges","archive_url":"https://api.github.com/repos/yvxiang/dfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yvxiang/dfs/downloads","issues_url":"https://api.github.com/repos/yvxiang/dfs/issues{/number}","pulls_url":"https://api.github.com/repos/yvxiang/dfs/pulls{/number}","milestones_url":"https://api.github.com/repos/yvxiang/dfs/milestones{/number}","notifications_url":"https://api.github.com/repos/yvxiang/dfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yvxiang/dfs/labels{/name}","releases_url":"https://api.github.com/repos/yvxiang/dfs/releases{/id}","deployments_url":"https://api.github.com/repos/yvxiang/dfs/deployments","created_at":"2015-03-27T12:37:26Z","updated_at":"2016-01-12T10:38:47Z","pushed_at":"2016-04-05T02:12:10Z","git_url":"git://github.com/yvxiang/dfs.git","ssh_url":"git@github.com:yvxiang/dfs.git","clone_url":"https://github.com/yvxiang/dfs.git","svn_url":"https://github.com/yvxiang/dfs","homepage":null,"size":3475,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bluebore:master","ref":"master","sha":"da6eb1ba4e705e1166753bfd4ef955087b704b18","user":{"login":"bluebore","id":6851389,"avatar_url":"https://avatars.githubusercontent.com/u/6851389?v=3","gravatar_id":"","url":"https://api.github.com/users/bluebore","html_url":"https://github.com/bluebore","followers_url":"https://api.github.com/users/bluebore/followers","following_url":"https://api.github.com/users/bluebore/following{/other_user}","gists_url":"https://api.github.com/users/bluebore/gists{/gist_id}","starred_url":"https://api.github.com/users/bluebore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluebore/subscriptions","organizations_url":"https://api.github.com/users/bluebore/orgs","repos_url":"https://api.github.com/users/bluebore/repos","events_url":"https://api.github.com/users/bluebore/events{/privacy}","received_events_url":"https://api.github.com/users/bluebore/received_events","type":"User","site_admin":false},"repo":{"id":26562172,"name":"bfs","full_name":"bluebore/bfs","owner":{"login":"bluebore","id":6851389,"avatar_url":"https://avatars.githubusercontent.com/u/6851389?v=3","gravatar_id":"","url":"https://api.github.com/users/bluebore","html_url":"https://github.com/bluebore","followers_url":"https://api.github.com/users/bluebore/followers","following_url":"https://api.github.com/users/bluebore/following{/other_user}","gists_url":"https://api.github.com/users/bluebore/gists{/gist_id}","starred_url":"https://api.github.com/users/bluebore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluebore/subscriptions","organizations_url":"https://api.github.com/users/bluebore/orgs","repos_url":"https://api.github.com/users/bluebore/repos","events_url":"https://api.github.com/users/bluebore/events{/privacy}","received_events_url":"https://api.github.com/users/bluebore/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bluebore/bfs","description":"The Baidu File System.","fork":false,"url":"https://api.github.com/repos/bluebore/bfs","forks_url":"https://api.github.com/repos/bluebore/bfs/forks","keys_url":"https://api.github.com/repos/bluebore/bfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bluebore/bfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bluebore/bfs/teams","hooks_url":"https://api.github.com/repos/bluebore/bfs/hooks","issue_events_url":"https://api.github.com/repos/bluebore/bfs/issues/events{/number}","events_url":"https://api.github.com/repos/bluebore/bfs/events","assignees_url":"https://api.github.com/repos/bluebore/bfs/assignees{/user}","branches_url":"https://api.github.com/repos/bluebore/bfs/branches{/branch}","tags_url":"https://api.github.com/repos/bluebore/bfs/tags","blobs_url":"https://api.github.com/repos/bluebore/bfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bluebore/bfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bluebore/bfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/bluebore/bfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bluebore/bfs/statuses/{sha}","languages_url":"https://api.github.com/repos/bluebore/bfs/languages","stargazers_url":"https://api.github.com/repos/bluebore/bfs/stargazers","contributors_url":"https://api.github.com/repos/bluebore/bfs/contributors","subscribers_url":"https://api.github.com/repos/bluebore/bfs/subscribers","subscription_url":"https://api.github.com/repos/bluebore/bfs/subscription","commits_url":"https://api.github.com/repos/bluebore/bfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/bluebore/bfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/bluebore/bfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/bluebore/bfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/bluebore/bfs/contents/{+path}","compare_url":"https://api.github.com/repos/bluebore/bfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bluebore/bfs/merges","archive_url":"https://api.github.com/repos/bluebore/bfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bluebore/bfs/downloads","issues_url":"https://api.github.com/repos/bluebore/bfs/issues{/number}","pulls_url":"https://api.github.com/repos/bluebore/bfs/pulls{/number}","milestones_url":"https://api.github.com/repos/bluebore/bfs/milestones{/number}","notifications_url":"https://api.github.com/repos/bluebore/bfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bluebore/bfs/labels{/name}","releases_url":"https://api.github.com/repos/bluebore/bfs/releases{/id}","deployments_url":"https://api.github.com/repos/bluebore/bfs/deployments","created_at":"2014-11-13T00:00:29Z","updated_at":"2016-04-04T13:19:33Z","pushed_at":"2016-04-05T02:14:45Z","git_url":"git://github.com/bluebore/bfs.git","ssh_url":"git@github.com:bluebore/bfs.git","clone_url":"https://github.com/bluebore/bfs.git","svn_url":"https://github.com/bluebore/bfs","homepage":"","size":3944,"stargazers_count":20,"watchers_count":20,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":35,"forks":15,"open_issues":35,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bluebore/bfs/pulls/255"},"html":{"href":"https://github.com/bluebore/bfs/pull/255"},"issue":{"href":"https://api.github.com/repos/bluebore/bfs/issues/255"},"comments":{"href":"https://api.github.com/repos/bluebore/bfs/issues/255/comments"},"review_comments":{"href":"https://api.github.com/repos/bluebore/bfs/pulls/255/comments"},"review_comment":{"href":"https://api.github.com/repos/bluebore/bfs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bluebore/bfs/pulls/255/commits"},"statuses":{"href":"https://api.github.com/repos/bluebore/bfs/statuses/c9751f61e22bca582b31d71247772d72bbc869fd"}}}}