From 65bfa23a53c8cbddfc9e6990fc08cace2cd750ee Mon Sep 17 00:00:00 2001 From: walter Date: Fri, 27 Dec 2024 10:17:23 +0800 Subject: [PATCH] [fix](clone) Fix the skipped link file due to the stale value (#46009) The clone task will compare the differences and similarities between local and downloaded files. If the md5sum of two binlog files is the same, it will set `skip_link_file` to skip the linking of that file. However, `skip_link_file` isn't reset on time. As a result, subsequent files will all be skipped because `skip_link_file` has been set, which leads to the problem that for some rowsets, the meta exists while the segment file doesn't. The error msg: ``` [NOT_FOUND]failed to get file size /mnt/disk3/VEC_ASAN2/doris.HDD/data/900/13372467/1624966973/02000000002e1250744766e3a98c0e213d847daea65158a9_0.dat ``` --- be/src/olap/task/engine_clone_task.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/be/src/olap/task/engine_clone_task.cpp b/be/src/olap/task/engine_clone_task.cpp index 9af3e078d3aefa..ecf1bdfc6d5c7d 100644 --- a/be/src/olap/task/engine_clone_task.cpp +++ b/be/src/olap/task/engine_clone_task.cpp @@ -813,8 +813,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. " @@ -822,6 +820,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) {