diff --git a/be/src/common/config.h b/be/src/common/config.h index 4f6b98578e7d07..57829127d2d03d 100644 --- a/be/src/common/config.h +++ b/be/src/common/config.h @@ -414,10 +414,10 @@ namespace config { CONF_String(small_file_dir, "${DORIS_HOME}/lib/small_file/"); // path gc CONF_Bool(path_gc_check, "true"); - CONF_Int32(path_gc_check_interval_second, "1800"); + CONF_Int32(path_gc_check_interval_second, "86400"); CONF_Int32(path_gc_check_step, "1000"); CONF_Int32(path_gc_check_step_interval_ms, "10"); - CONF_Int32(path_scan_interval_second, "1800"); + CONF_Int32(path_scan_interval_second, "86400"); } // namespace config } // namespace doris diff --git a/be/src/olap/data_dir.cpp b/be/src/olap/data_dir.cpp index 4c4d9052840ca7..e47bfa640f4004 100755 --- a/be/src/olap/data_dir.cpp +++ b/be/src/olap/data_dir.cpp @@ -964,10 +964,17 @@ void DataDir::perform_path_gc_by_rowsetid() { bool valid = tablet->check_rowset_id(rowset_id); if (!valid) { // if the rowset id is less than tablet's initial end rowset id - // and the path is not in unused_rowsets, delete the path. + // and the rowsetid is not in unused_rowsets + // and the rowsetid is not in committed rowsets + // then delete the path. if (rowset_id < tablet->initial_end_rowset_id() && !StorageEngine::instance()->check_rowset_id_in_unused_rowsets(rowset_id)) { - _process_garbage_path(path); + RowsetMetaSharedPtr rowset_meta = nullptr; + OLAPStatus status = RowsetMetaManager::get_rowset_meta( + _meta, tablet->tablet_uid(), rowset_id, rowset_meta); + if (status == OLAP_ERR_META_KEY_NOT_FOUND) { + _process_garbage_path(path); + } } } } @@ -983,6 +990,7 @@ void DataDir::perform_path_scan() { { std::unique_lock lck(_check_path_mutex); if (_all_check_paths.size() > 0) { + LOG(INFO) << "_all_check_paths is not empty when path scan."; return; } LOG(INFO) << "start to scan data dir path:" << _path;