yiguolei commented on a change in pull request #872: Rename rowset id in
restore stage
URL: https://github.com/apache/incubator-doris/pull/872#discussion_r273020174
##########
File path: be/src/olap/task/engine_clone_task.cpp
##########
@@ -957,6 +863,15 @@ OLAPStatus
EngineCloneTask::_clone_full_data(TabletSharedPtr tablet, TabletMeta*
// clone_data to tablet
OLAPStatus clone_res = tablet->revise_tablet_meta(*cloned_tablet_meta,
rowsets_to_clone, versions_to_delete);
LOG(INFO) << "finish to full clone. tablet=" << tablet->full_name() << ",
res=" << clone_res;
+ // 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();
Review comment:
not validate. because if remove old files failed the clone task should also
be success. It will depend on gc thread to recycle the rowset to be deleted.
----------------------------------------------------------------
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]