caiconghui commented on a change in pull request #8486:
URL: https://github.com/apache/incubator-doris/pull/8486#discussion_r828817764
##########
File path: be/src/olap/tablet_manager.cpp
##########
@@ -881,36 +826,27 @@ OLAPStatus TabletManager::build_all_report_tablets_info(
for (const auto& tablets_shard : _tablets_shards) {
ReadLock rdlock(tablets_shard.lock);
for (const auto& item : tablets_shard.tablet_map) {
- if (item.second.table_arr.empty()) {
- continue;
- }
uint64_t tablet_id = item.first;
+ TabletSharedPtr tablet_ptr = item.second;
TTablet t_tablet;
- for (TabletSharedPtr tablet_ptr : item.second.table_arr) {
- TTabletInfo tablet_info;
- tablet_ptr->build_tablet_report_info(&tablet_info);
- // find expired transaction corresponding to this tablet
- TabletInfo tinfo(tablet_id, tablet_ptr->schema_hash(),
tablet_ptr->tablet_uid());
- auto find = expire_txn_map.find(tinfo);
- if (find != expire_txn_map.end()) {
- tablet_info.__set_transaction_ids(find->second);
- expire_txn_map.erase(find);
- }
- t_tablet.tablet_infos.push_back(tablet_info);
- if (tablet_ptr->tablet_id() == tablet_id) {
- tablet_version_num_hist.add(tablet_ptr->version_count());
- }
- }
- if (!t_tablet.tablet_infos.empty()) {
- tablets_info->emplace(tablet_id, t_tablet);
- TTabletStat t_tablet_stat;
- const auto& tablet_info = t_tablet.tablet_infos[0];
- t_tablet_stat.tablet_id = tablet_info.tablet_id;
- t_tablet_stat.data_size = tablet_info.data_size;
- t_tablet_stat.row_num = tablet_info.row_count;
- t_tablet_stat.version_count = tablet_info.version_count;
- local_cache->emplace_back(std::move(t_tablet_stat));
+ TTabletInfo tablet_info;
+ tablet_ptr->build_tablet_report_info(&tablet_info);
+ // find expired transaction corresponding to this tablet
+ TabletInfo tinfo(tablet_id, tablet_ptr->schema_hash(),
tablet_ptr->tablet_uid());
+ auto find = expire_txn_map.find(tinfo);
+ if (find != expire_txn_map.end()) {
+ tablet_info.__set_transaction_ids(find->second);
+ expire_txn_map.erase(find);
}
+ t_tablet.tablet_infos.push_back(tablet_info);
+ tablet_version_num_hist.add(tablet_ptr->version_count());
+ tablets_info->emplace(tablet_id, t_tablet);
+ TTabletStat t_tablet_stat;
+ t_tablet_stat.tablet_id = tablet_info.tablet_id;
Review comment:
this code have been fixed in PR #8507
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]