kangpinghuang commented on a change in pull request #941: Reconstruct _rs_graph
and _rs_version_map when clone finished
URL: https://github.com/apache/incubator-doris/pull/941#discussion_r276120503
##########
File path: be/src/olap/tablet.cpp
##########
@@ -206,6 +206,24 @@ OLAPStatus Tablet::revise_tablet_meta(const TabletMeta&
tablet_meta,
_tablet_meta = new_tablet_meta;
} while (0);
+ for (auto& version : versions_to_delete) {
+ auto it = _rs_version_map.find(version);
+ _rs_version_map.erase(it);
+ }
+
+ for (auto& rs_meta : rowsets_to_clone) {
+ Version version = { rs_meta->start_version(), rs_meta->end_version() };
+ RowsetSharedPtr rowset(new AlphaRowset(&_schema, _tablet_path,
_data_dir, rs_meta));
+ _rs_version_map[version] = rowset;
Review comment:
I think rowset should be added to the map after init and you should return
failure if init failed.
----------------------------------------------------------------
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]