yiguolei commented on a change in pull request #1761: Add multi-path in
RowsetGraph
URL: https://github.com/apache/incubator-doris/pull/1761#discussion_r322563769
##########
File path: be/src/olap/tablet.cpp
##########
@@ -250,28 +228,35 @@ OLAPStatus Tablet::add_rowset(RowsetSharedPtr rowset) {
return OLAP_SUCCESS;
}
-OLAPStatus Tablet::modify_rowsets(const vector<RowsetSharedPtr>& to_add,
- const vector<RowsetSharedPtr>& to_delete) {
+OLAPStatus Tablet::add_rowsets(const vector<RowsetSharedPtr>& to_add) {
vector<RowsetMetaSharedPtr> rs_metas_to_add;
for (auto& rs : to_add) {
rs_metas_to_add.push_back(rs->rowset_meta());
}
+ _tablet_meta->add_rs_metas(rs_metas_to_add);
+
+ for (auto& rs : to_add) {
+ _rs_version_map[rs->version()] = rs;;
+ }
+
+ _rs_graph.reconstruct_rowset_graph(_tablet_meta->all_rs_metas());
+
+ return OLAP_SUCCESS;
+}
+
+OLAPStatus Tablet::delete_rowsets(const vector<RowsetSharedPtr>& to_delete) {
vector<RowsetMetaSharedPtr> rs_metas_to_delete;
Review comment:
delete rowsets should add the rowset to unused rowset list
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]