| 1743 | } |
| 1744 | |
| 1745 | void TabletManager::LoadTabletMeta(const std::string& key, const std::string& value) { |
| 1746 | TabletMeta meta; |
| 1747 | ParseMetaTableKeyValue(key, value, &meta); |
| 1748 | meta.set_status(TabletMeta::kTabletOffline); |
| 1749 | StatusCode ret_status = kTabletNodeOk; |
| 1750 | if (meta.table_name() == FLAGS_tera_master_meta_table_name) { |
| 1751 | LOG(INFO) << "ignore meta tablet record in meta table"; |
| 1752 | } else { |
| 1753 | TablePtr table; |
| 1754 | if (!FindTable(meta.table_name(), &table)) { |
| 1755 | LOG(WARNING) << "table schema not exist, skip this tablet: " << meta.path(); |
| 1756 | return; |
| 1757 | } |
| 1758 | TabletPtr tablet = table->AddTablet(meta, &ret_status); |
| 1759 | if (!tablet) { |
| 1760 | LOG(ERROR) << "duplicate tablet in meta table: table=" << meta.table_name() |
| 1761 | << " start=" << DebugString(meta.key_range().key_start()); |
| 1762 | // TODO: try correct invalid record |
| 1763 | } |
| 1764 | } |
| 1765 | } |
| 1766 | |
| 1767 | bool TabletManager::ClearMetaTable(const std::string& meta_tablet_addr, StatusCode* ret_status) { |
| 1768 | WriteTabletRequest write_request; |
no test coverage detected