You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2019/04/10 03:31:31 UTC

[GitHub] [incubator-doris] chaoyli commented on a change in pull request #895: Remove old files after tablet is successfully loaded

chaoyli commented on a change in pull request #895: Remove old files after tablet is successfully loaded
URL: https://github.com/apache/incubator-doris/pull/895#discussion_r273772207
 
 

 ##########
 File path: be/src/olap/data_dir.cpp
 ##########
 @@ -604,18 +605,24 @@ OLAPStatus DataDir::_convert_old_tablet() {
     OLAPStatus convert_tablet_status = TabletMetaManager::traverse_headers(_meta, 
         convert_tablet_func, OLD_HEADER_PREFIX);
     if (convert_tablet_status != OLAP_SUCCESS) {
-        LOG(WARNING) << "there is failure when convert old tablet, data dir:" << _path;
+        LOG(FATAL) << "there is failure when convert old tablet, data dir:" << _path;
         return convert_tablet_status;
     } else {
         LOG(INFO) << "successfully convert old tablet, data dir: " << _path;
     }
     return OLAP_SUCCESS;
 }
 
-OLAPStatus DataDir::_remove_old_meta_and_files() {
+OLAPStatus DataDir::_remove_old_meta_and_files(std::set<int64_t>& tablet_ids) {
     // clean old meta(olap header message) 
-    auto clean_old_meta_func = [this](long tablet_id,
+    auto clean_old_meta_func = [this, &tablet_ids](long tablet_id,
         long schema_hash, const std::string& value) -> bool {
+        if (tablet_ids.count(tablet_id) == 0) {
 
 Review comment:
   tablet_ids.find()

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@doris.apache.org
For additional commands, e-mail: dev-help@doris.apache.org