zhannngchen commented on code in PR #20907:
URL: https://github.com/apache/doris/pull/20907#discussion_r1244787127
##########
be/src/olap/tablet.cpp:
##########
@@ -3296,29 +3295,39 @@ void
Tablet::calc_compaction_output_rowset_delete_bitmap(
{rowset->rowset_id(), seg_id,
end_version},
&subset_map);
// traverse all versions and convert rowid
- for (auto iter = subset_map.delete_bitmap.begin();
- iter != subset_map.delete_bitmap.end(); ++iter) {
- auto cur_version = std::get<2>(iter->first);
- for (auto index = iter->second.begin(); index !=
iter->second.end(); ++index) {
- src.row_id = *index;
- if (rowid_conversion.get(src, &dst) != 0) {
- VLOG_CRITICAL << "Can't find rowid, may be deleted by
the delete_handler, "
- << " src loaction: |" << src.rowset_id
<< "|"
- << src.segment_id << "|" << src.row_id
- << " version: " << cur_version;
- missed_rows->insert(src);
- continue;
- }
- VLOG_DEBUG << "calc_compaction_output_rowset_delete_bitmap
dst location: |"
- << dst.rowset_id << "|" << dst.segment_id <<
"|" << dst.row_id
- << " src location: |" << src.rowset_id << "|"
<< src.segment_id
- << "|" << src.row_id << " start version: " <<
start_version
- << "end version" << end_version;
- (*location_map)[rowset].emplace_back(src, dst);
- output_rowset_delete_bitmap->add({dst.rowset_id,
dst.segment_id, cur_version},
- dst.row_id);
- }
+ convert_rowid(rowset, subset_map, src, rowid_conversion,
start_version, end_version,
+ missed_rows, location_map,
output_rowset_delete_bitmap);
+ }
+ }
+}
+
+void Tablet::convert_rowid(
Review Comment:
This method don't needs so many parameters, we should try our best to make
the declaration more clear
--
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]