| 1416 | } |
| 1417 | |
| 1418 | bool Table::FindOverlappedTablets(const std::string& key_start, const std::string& key_end, |
| 1419 | std::vector<TabletPtr>* tablets) { |
| 1420 | MutexLock lock(&mutex_); |
| 1421 | TabletList::iterator it2 = tablets_list_.upper_bound(key_start); |
| 1422 | CHECK(it2 != tablets_list_.begin()); |
| 1423 | --it2; |
| 1424 | while (it2 != tablets_list_.end() && |
| 1425 | (key_end.empty() || it2->second->meta_.key_range().key_start() < key_end)) { |
| 1426 | tablets->push_back(it2->second); |
| 1427 | ++it2; |
| 1428 | } |
| 1429 | return !tablets->empty(); |
| 1430 | } |
| 1431 | |
| 1432 | bool TabletManager::SearchTablet(const std::string& table_name, const std::string& key, |
| 1433 | TabletPtr* tablet, StatusCode* ret_status) { |
no test coverage detected