diff --git a/be/src/olap/task/engine_clone_task.cpp b/be/src/olap/task/engine_clone_task.cpp index 259b1f7108..5158180378 100644 --- a/be/src/olap/task/engine_clone_task.cpp +++ b/be/src/olap/task/engine_clone_task.cpp @@ -702,8 +702,6 @@ Status EngineCloneTask::_finish_clone(Tablet* tablet, const std::string& clone_d /// Traverse all downloaded clone files in CLONE dir. /// If it does not exist in local tablet dir, link the file to local tablet dir /// And save all linked files in linked_success_files. - /// if binlog exist in clone dir and md5sum equal, then skip link file - bool skip_link_file = false; for (const string& clone_file : clone_file_names) { if (local_file_names.find(clone_file) != local_file_names.end()) { VLOG_NOTICE << "find same file when clone, skip it. " @@ -711,6 +709,8 @@ Status EngineCloneTask::_finish_clone(Tablet* tablet, const std::string& clone_d continue; } + /// if binlog exist in clone dir and md5sum equal, then skip link file + bool skip_link_file = false; std::string to; if (clone_file.ends_with(".binlog") || clone_file.ends_with(".binlog-index")) { if (!contain_binlog) {