imay commented on a change in pull request #1748: RowsetFactory as a single 
entry for Rowset creation
URL: https://github.com/apache/incubator-doris/pull/1748#discussion_r320795386
 
 

 ##########
 File path: be/src/olap/task/engine_clone_task.cpp
 ##########
 @@ -847,10 +844,19 @@ OLAPStatus 
EngineCloneTask::_clone_full_data(TabletSharedPtr tablet, TabletMeta*
     // in previous step, copy all files from CLONE_DIR to tablet dir
     // but some rowset is useless, so that remove them here
     for (auto& rs_meta_ptr : rs_metas_found_in_src) {
-        RowsetSharedPtr org_rowset(new 
AlphaRowset(&(cloned_tablet_meta->tablet_schema()), 
-            tablet->tablet_path(), tablet->data_dir(), rs_meta_ptr));
-        if (org_rowset->init() == OLAP_SUCCESS && org_rowset->load() == 
OLAP_SUCCESS) {
-            org_rowset->remove();
+        RowsetSharedPtr rowset_to_remove;
+        auto s = 
RowsetFactory::create_rowset(&(cloned_tablet_meta->tablet_schema()),
+                                              tablet->tablet_path(),
+                                              tablet->data_dir(),
+                                              rs_meta_ptr,
+                                              &rowset_to_remove);
+        if (s != OLAP_SUCCESS) {
+            LOG(WARNING) << "failed to init rowset to remove: " << 
rs_meta_ptr->rowset_id().to_string();
+            continue;
+        }
 
 Review comment:
   forget load?

----------------------------------------------------------------
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]

Reply via email to