| 2900 | } |
| 2901 | |
| 2902 | void MasterImpl::DoTabletNodeGcPhase2() { |
| 2903 | std::vector<TablePtr> table_list; |
| 2904 | tablet_manager_->ShowTable(&table_list, NULL); |
| 2905 | for (uint32_t i = 0; i < table_list.size(); ++i) { |
| 2906 | table_list[i]->CleanObsoleteFile(); |
| 2907 | } |
| 2908 | |
| 2909 | LOG(INFO) << "[gc] try clean trash dir."; |
| 2910 | int64_t start = get_micros(); |
| 2911 | io::CleanTrashDir(); |
| 2912 | int64_t cost = (get_micros() - start) / 1000; |
| 2913 | LOG(INFO) << "[gc] clean trash dir done, cost: " << cost << "ms."; |
| 2914 | |
| 2915 | MutexLock lock(&mutex_); |
| 2916 | if (gc_enabled_) { |
| 2917 | ScheduleTabletNodeGc(); |
| 2918 | } else { |
| 2919 | gc_timer_id_ = kInvalidTimerId; |
| 2920 | } |
| 2921 | } |
| 2922 | |
| 2923 | void MasterImpl::RefreshTableCounter() { |
| 2924 | int64_t start = get_micros(); |
nothing calls this directly
no test coverage detected