{"action":"created","comment":{"url":"https://api.github.com/repos/baidu/tera/pulls/comments/85265195","pull_request_review_id":5990264,"id":85265195,"diff_hunk":"@@ -370,59 +378,39 @@ void MasterImpl::RestoreUserTablet(const std::vector<TabletMeta>& report_meta_li\n         }\n     }\n \n-    std::vector<TabletPtr> dead_node_tablet_list;\n     std::vector<TabletPtr> all_tablet_list;\n     tablet_manager_->ShowTable(NULL, &all_tablet_list);\n     std::vector<TabletPtr>::iterator it;\n     for (it = all_tablet_list.begin(); it != all_tablet_list.end(); ++it) {\n         TabletPtr tablet = *it;\n+        if (tablet->GetTableName() == FLAGS_tera_master_meta_table_name) {\n+            continue;\n+        }\n         const std::string& server_addr = tablet->GetServerAddr();\n         if (tablet->GetStatus() == kTableReady) {\n             VLOG(8) << \"READY Tablet, \" << tablet;\n             continue;\n         }\n         tablet_availability_->AddNotReadyTablet(tablet->GetPath());\n-        // meta table may be manipulated by other threads during restore\n-        if (tablet->GetTableName() == FLAGS_tera_master_meta_table_name) {\n-            continue;\n-        }\n         CHECK(tablet->GetStatus() == kTableNotInit);\n-        tablet->SetStatus(kTableOffLine);\n-        VLOG(8) << \"OFFLINE Tablet, \" << tablet;\n \n         TabletNodePtr node;\n-        if (!server_addr.empty()\n-            && tabletnode_manager_->FindTabletNode(server_addr, &node)\n-            && node->state_ == kReady) {\n+        if (server_addr.empty()) {\n+            tablet->SetStatus(kTableOffLine);\n+            VLOG(8) << \"OFFLINE Tablet with empty addr, \" << tablet;\n+        } else if (!tabletnode_manager_->FindTabletNode(server_addr, &node)) {\n+            tablet->SetStatus(kTableOffLine);\n+            VLOG(8) << \"OFFLINE Tablet of Dead TS, \" << tablet;","path":"src/master/master_impl.cc","position":64,"original_position":64,"commit_id":"0cd9327d587d00a056af3b8b2d57be7885acc4c7","original_commit_id":"0cd9327d587d00a056af3b8b2d57be7885acc4c7","user":{"login":"caijieming-baidu","id":13461134,"avatar_url":"https://avatars.githubusercontent.com/u/13461134?v=3","gravatar_id":"","url":"https://api.github.com/users/caijieming-baidu","html_url":"https://github.com/caijieming-baidu","followers_url":"https://api.github.com/users/caijieming-baidu/followers","following_url":"https://api.github.com/users/caijieming-baidu/following{/other_user}","gists_url":"https://api.github.com/users/caijieming-baidu/gists{/gist_id}","starred_url":"https://api.github.com/users/caijieming-baidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caijieming-baidu/subscriptions","organizations_url":"https://api.github.com/users/caijieming-baidu/orgs","repos_url":"https://api.github.com/users/caijieming-baidu/repos","events_url":"https://api.github.com/users/caijieming-baidu/events{/privacy}","received_events_url":"https://api.github.com/users/caijieming-baidu/received_events","type":"User","site_admin":false},"body":"是否应该用应该判断是否是not init状态，在考虑设置offline；有可能ts被kick；","created_at":"2016-10-27T04:44:38Z","updated_at":"2016-10-27T05:00:52Z","html_url":"https://github.com/baidu/tera/pull/1038#discussion_r85265195","pull_request_url":"https://api.github.com/repos/baidu/tera/pulls/1038","_links":{"self":{"href":"https://api.github.com/repos/baidu/tera/pulls/comments/85265195"},"html":{"href":"https://github.com/baidu/tera/pull/1038#discussion_r85265195"},"pull_request":{"href":"https://api.github.com/repos/baidu/tera/pulls/1038"}}},"pull_request":{"url":"https://api.github.com/repos/baidu/tera/pulls/1038","id":89584943,"html_url":"https://github.com/baidu/tera/pull/1038","diff_url":"https://github.com/baidu/tera/pull/1038.diff","patch_url":"https://github.com/baidu/tera/pull/1038.patch","issue_url":"https://api.github.com/repos/baidu/tera/issues/1038","number":1038,"state":"open","locked":false,"title":"issue=#1030 bugfix of multi-load at master initial phase","user":{"login":"00k","id":9716419,"avatar_url":"https://avatars.githubusercontent.com/u/9716419?v=3","gravatar_id":"","url":"https://api.github.com/users/00k","html_url":"https://github.com/00k","followers_url":"https://api.github.com/users/00k/followers","following_url":"https://api.github.com/users/00k/following{/other_user}","gists_url":"https://api.github.com/users/00k/gists{/gist_id}","starred_url":"https://api.github.com/users/00k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/00k/subscriptions","organizations_url":"https://api.github.com/users/00k/orgs","repos_url":"https://api.github.com/users/00k/repos","events_url":"https://api.github.com/users/00k/events{/privacy}","received_events_url":"https://api.github.com/users/00k/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-17T09:04:57Z","updated_at":"2016-10-27T05:00:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c6d1c1addc5a01f52e49a0290d8a324d8cba8709","assignee":{"login":"lylei","id":2767333,"avatar_url":"https://avatars.githubusercontent.com/u/2767333?v=3","gravatar_id":"","url":"https://api.github.com/users/lylei","html_url":"https://github.com/lylei","followers_url":"https://api.github.com/users/lylei/followers","following_url":"https://api.github.com/users/lylei/following{/other_user}","gists_url":"https://api.github.com/users/lylei/gists{/gist_id}","starred_url":"https://api.github.com/users/lylei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lylei/subscriptions","organizations_url":"https://api.github.com/users/lylei/orgs","repos_url":"https://api.github.com/users/lylei/repos","events_url":"https://api.github.com/users/lylei/events{/privacy}","received_events_url":"https://api.github.com/users/lylei/received_events","type":"User","site_admin":false},"assignees":[{"login":"lylei","id":2767333,"avatar_url":"https://avatars.githubusercontent.com/u/2767333?v=3","gravatar_id":"","url":"https://api.github.com/users/lylei","html_url":"https://github.com/lylei","followers_url":"https://api.github.com/users/lylei/followers","following_url":"https://api.github.com/users/lylei/following{/other_user}","gists_url":"https://api.github.com/users/lylei/gists{/gist_id}","starred_url":"https://api.github.com/users/lylei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lylei/subscriptions","organizations_url":"https://api.github.com/users/lylei/orgs","repos_url":"https://api.github.com/users/lylei/repos","events_url":"https://api.github.com/users/lylei/events{/privacy}","received_events_url":"https://api.github.com/users/lylei/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/baidu/tera/pulls/1038/commits","review_comments_url":"https://api.github.com/repos/baidu/tera/pulls/1038/comments","review_comment_url":"https://api.github.com/repos/baidu/tera/pulls/comments{/number}","comments_url":"https://api.github.com/repos/baidu/tera/issues/1038/comments","statuses_url":"https://api.github.com/repos/baidu/tera/statuses/0cd9327d587d00a056af3b8b2d57be7885acc4c7","head":{"label":"00k:master_init_bug","ref":"master_init_bug","sha":"0cd9327d587d00a056af3b8b2d57be7885acc4c7","user":{"login":"00k","id":9716419,"avatar_url":"https://avatars.githubusercontent.com/u/9716419?v=3","gravatar_id":"","url":"https://api.github.com/users/00k","html_url":"https://github.com/00k","followers_url":"https://api.github.com/users/00k/followers","following_url":"https://api.github.com/users/00k/following{/other_user}","gists_url":"https://api.github.com/users/00k/gists{/gist_id}","starred_url":"https://api.github.com/users/00k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/00k/subscriptions","organizations_url":"https://api.github.com/users/00k/orgs","repos_url":"https://api.github.com/users/00k/repos","events_url":"https://api.github.com/users/00k/events{/privacy}","received_events_url":"https://api.github.com/users/00k/received_events","type":"User","site_admin":false},"repo":{"id":32000292,"name":"tera","full_name":"00k/tera","owner":{"login":"00k","id":9716419,"avatar_url":"https://avatars.githubusercontent.com/u/9716419?v=3","gravatar_id":"","url":"https://api.github.com/users/00k","html_url":"https://github.com/00k","followers_url":"https://api.github.com/users/00k/followers","following_url":"https://api.github.com/users/00k/following{/other_user}","gists_url":"https://api.github.com/users/00k/gists{/gist_id}","starred_url":"https://api.github.com/users/00k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/00k/subscriptions","organizations_url":"https://api.github.com/users/00k/orgs","repos_url":"https://api.github.com/users/00k/repos","events_url":"https://api.github.com/users/00k/events{/privacy}","received_events_url":"https://api.github.com/users/00k/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/00k/tera","description":"A distributed table storage system.","fork":true,"url":"https://api.github.com/repos/00k/tera","forks_url":"https://api.github.com/repos/00k/tera/forks","keys_url":"https://api.github.com/repos/00k/tera/keys{/key_id}","collaborators_url":"https://api.github.com/repos/00k/tera/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/00k/tera/teams","hooks_url":"https://api.github.com/repos/00k/tera/hooks","issue_events_url":"https://api.github.com/repos/00k/tera/issues/events{/number}","events_url":"https://api.github.com/repos/00k/tera/events","assignees_url":"https://api.github.com/repos/00k/tera/assignees{/user}","branches_url":"https://api.github.com/repos/00k/tera/branches{/branch}","tags_url":"https://api.github.com/repos/00k/tera/tags","blobs_url":"https://api.github.com/repos/00k/tera/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/00k/tera/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/00k/tera/git/refs{/sha}","trees_url":"https://api.github.com/repos/00k/tera/git/trees{/sha}","statuses_url":"https://api.github.com/repos/00k/tera/statuses/{sha}","languages_url":"https://api.github.com/repos/00k/tera/languages","stargazers_url":"https://api.github.com/repos/00k/tera/stargazers","contributors_url":"https://api.github.com/repos/00k/tera/contributors","subscribers_url":"https://api.github.com/repos/00k/tera/subscribers","subscription_url":"https://api.github.com/repos/00k/tera/subscription","commits_url":"https://api.github.com/repos/00k/tera/commits{/sha}","git_commits_url":"https://api.github.com/repos/00k/tera/git/commits{/sha}","comments_url":"https://api.github.com/repos/00k/tera/comments{/number}","issue_comment_url":"https://api.github.com/repos/00k/tera/issues/comments{/number}","contents_url":"https://api.github.com/repos/00k/tera/contents/{+path}","compare_url":"https://api.github.com/repos/00k/tera/compare/{base}...{head}","merges_url":"https://api.github.com/repos/00k/tera/merges","archive_url":"https://api.github.com/repos/00k/tera/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/00k/tera/downloads","issues_url":"https://api.github.com/repos/00k/tera/issues{/number}","pulls_url":"https://api.github.com/repos/00k/tera/pulls{/number}","milestones_url":"https://api.github.com/repos/00k/tera/milestones{/number}","notifications_url":"https://api.github.com/repos/00k/tera/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/00k/tera/labels{/name}","releases_url":"https://api.github.com/repos/00k/tera/releases{/id}","deployments_url":"https://api.github.com/repos/00k/tera/deployments","created_at":"2015-03-11T05:36:34Z","updated_at":"2016-01-11T03:35:16Z","pushed_at":"2016-10-26T05:20:12Z","git_url":"git://github.com/00k/tera.git","ssh_url":"git@github.com:00k/tera.git","clone_url":"https://github.com/00k/tera.git","svn_url":"https://github.com/00k/tera","homepage":"","size":14160,"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":"baidu:master","ref":"master","sha":"ebd19a801ef7150eaf180bdb93afdfcdc2b4d87c","user":{"login":"baidu","id":13245940,"avatar_url":"https://avatars.githubusercontent.com/u/13245940?v=3","gravatar_id":"","url":"https://api.github.com/users/baidu","html_url":"https://github.com/baidu","followers_url":"https://api.github.com/users/baidu/followers","following_url":"https://api.github.com/users/baidu/following{/other_user}","gists_url":"https://api.github.com/users/baidu/gists{/gist_id}","starred_url":"https://api.github.com/users/baidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baidu/subscriptions","organizations_url":"https://api.github.com/users/baidu/orgs","repos_url":"https://api.github.com/users/baidu/repos","events_url":"https://api.github.com/users/baidu/events{/privacy}","received_events_url":"https://api.github.com/users/baidu/received_events","type":"Organization","site_admin":false},"repo":{"id":18129915,"name":"tera","full_name":"baidu/tera","owner":{"login":"baidu","id":13245940,"avatar_url":"https://avatars.githubusercontent.com/u/13245940?v=3","gravatar_id":"","url":"https://api.github.com/users/baidu","html_url":"https://github.com/baidu","followers_url":"https://api.github.com/users/baidu/followers","following_url":"https://api.github.com/users/baidu/following{/other_user}","gists_url":"https://api.github.com/users/baidu/gists{/gist_id}","starred_url":"https://api.github.com/users/baidu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baidu/subscriptions","organizations_url":"https://api.github.com/users/baidu/orgs","repos_url":"https://api.github.com/users/baidu/repos","events_url":"https://api.github.com/users/baidu/events{/privacy}","received_events_url":"https://api.github.com/users/baidu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/baidu/tera","description":"An Internet-Scale Database.","fork":false,"url":"https://api.github.com/repos/baidu/tera","forks_url":"https://api.github.com/repos/baidu/tera/forks","keys_url":"https://api.github.com/repos/baidu/tera/keys{/key_id}","collaborators_url":"https://api.github.com/repos/baidu/tera/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/baidu/tera/teams","hooks_url":"https://api.github.com/repos/baidu/tera/hooks","issue_events_url":"https://api.github.com/repos/baidu/tera/issues/events{/number}","events_url":"https://api.github.com/repos/baidu/tera/events","assignees_url":"https://api.github.com/repos/baidu/tera/assignees{/user}","branches_url":"https://api.github.com/repos/baidu/tera/branches{/branch}","tags_url":"https://api.github.com/repos/baidu/tera/tags","blobs_url":"https://api.github.com/repos/baidu/tera/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/baidu/tera/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/baidu/tera/git/refs{/sha}","trees_url":"https://api.github.com/repos/baidu/tera/git/trees{/sha}","statuses_url":"https://api.github.com/repos/baidu/tera/statuses/{sha}","languages_url":"https://api.github.com/repos/baidu/tera/languages","stargazers_url":"https://api.github.com/repos/baidu/tera/stargazers","contributors_url":"https://api.github.com/repos/baidu/tera/contributors","subscribers_url":"https://api.github.com/repos/baidu/tera/subscribers","subscription_url":"https://api.github.com/repos/baidu/tera/subscription","commits_url":"https://api.github.com/repos/baidu/tera/commits{/sha}","git_commits_url":"https://api.github.com/repos/baidu/tera/git/commits{/sha}","comments_url":"https://api.github.com/repos/baidu/tera/comments{/number}","issue_comment_url":"https://api.github.com/repos/baidu/tera/issues/comments{/number}","contents_url":"https://api.github.com/repos/baidu/tera/contents/{+path}","compare_url":"https://api.github.com/repos/baidu/tera/compare/{base}...{head}","merges_url":"https://api.github.com/repos/baidu/tera/merges","archive_url":"https://api.github.com/repos/baidu/tera/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/baidu/tera/downloads","issues_url":"https://api.github.com/repos/baidu/tera/issues{/number}","pulls_url":"https://api.github.com/repos/baidu/tera/pulls{/number}","milestones_url":"https://api.github.com/repos/baidu/tera/milestones{/number}","notifications_url":"https://api.github.com/repos/baidu/tera/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/baidu/tera/labels{/name}","releases_url":"https://api.github.com/repos/baidu/tera/releases{/id}","deployments_url":"https://api.github.com/repos/baidu/tera/deployments","created_at":"2014-03-26T07:22:05Z","updated_at":"2016-10-27T04:43:14Z","pushed_at":"2016-10-26T12:15:27Z","git_url":"git://github.com/baidu/tera.git","ssh_url":"git@github.com:baidu/tera.git","clone_url":"https://github.com/baidu/tera.git","svn_url":"https://github.com/baidu/tera","homepage":"","size":17960,"stargazers_count":598,"watchers_count":598,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":180,"mirror_url":null,"open_issues_count":140,"forks":180,"open_issues":140,"watchers":598,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/baidu/tera/pulls/1038"},"html":{"href":"https://github.com/baidu/tera/pull/1038"},"issue":{"href":"https://api.github.com/repos/baidu/tera/issues/1038"},"comments":{"href":"https://api.github.com/repos/baidu/tera/issues/1038/comments"},"review_comments":{"href":"https://api.github.com/repos/baidu/tera/pulls/1038/comments"},"review_comment":{"href":"https://api.github.com/repos/baidu/tera/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/baidu/tera/pulls/1038/commits"},"statuses":{"href":"https://api.github.com/repos/baidu/tera/statuses/0cd9327d587d00a056af3b8b2d57be7885acc4c7"}}}}
{"actor":{"display_login":"caijieming-baidu"}}