MCPcopy Create free account
hub / github.com/baidu/tera / GiveupUpdateTabletMeta

Method GiveupUpdateTabletMeta

src/sdk/table_impl.cc:1724–1749  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1722}
1723
1724void TableImpl::GiveupUpdateTabletMeta(const std::string& key_start, const std::string& key_end) {
1725 std::map<std::string, std::list<int64_t> >::iterator ilist =
1726 pending_task_id_list_.lower_bound(key_start);
1727 while (ilist != pending_task_id_list_.end()) {
1728 if (!key_end.empty() && ilist->first >= key_end) {
1729 break;
1730 }
1731 std::list<int64_t>& task_id_list = ilist->second;
1732 for (std::list<int64_t>::iterator itask = task_id_list.begin(); itask != task_id_list.end();) {
1733 int64_t task_id = *itask;
1734 SdkTask* task = task_pool_.GetTask(task_id);
1735 if (task == NULL) {
1736 VLOG(10) << "task " << task_id << " timeout when update meta fail";
1737 itask = task_id_list.erase(itask);
1738 } else {
1739 task->DecRef();
1740 }
1741 ++itask;
1742 }
1743 if (task_id_list.empty()) {
1744 pending_task_id_list_.erase(ilist++);
1745 } else {
1746 ++ilist;
1747 }
1748 }
1749}
1750
1751void TableImpl::UpdateTabletMetaList(const TabletMeta& new_meta) {
1752 meta_mutex_.AssertHeld();

Callers

nothing calls this directly

Calls 3

GetTaskMethod · 0.80
emptyMethod · 0.45
DecRefMethod · 0.45

Tested by

no test coverage detected