This is an automated email from the ASF dual-hosted git repository. dataroaring pushed a commit to branch branch-3.0 in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push: new 1eadb71e238 branch-3.0: [fix](binlog) avoid adding acqurie_md5 param when enable_download_md5… #48573 (#48583) 1eadb71e238 is described below commit 1eadb71e23873d0a46a884490b315d97fe713d19 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> AuthorDate: Tue Mar 11 10:53:11 2025 +0800 branch-3.0: [fix](binlog) avoid adding acqurie_md5 param when enable_download_md5… #48573 (#48583) Cherry-picked from #48573 Co-authored-by: walter <maoch...@selectdb.com> --- be/src/service/backend_service.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/be/src/service/backend_service.cpp b/be/src/service/backend_service.cpp index b7cd5532866..dc7bdde3582 100644 --- a/be/src/service/backend_service.cpp +++ b/be/src/service/backend_service.cpp @@ -298,8 +298,10 @@ void _ingest_binlog(StorageEngine& engine, IngestBinlogArg* arg) { // Step 5.3: get all segment files for (int64_t segment_index = 0; segment_index < num_segments; ++segment_index) { auto segment_file_size = segment_file_sizes[segment_index]; - auto get_segment_file_url = - fmt::format("{}&acquire_md5=true", segment_file_urls[segment_index]); + auto get_segment_file_url = segment_file_urls[segment_index]; + if (config::enable_download_md5sum_check) { + get_segment_file_url = fmt::format("{}&acquire_md5=true", get_segment_file_url); + } auto segment_path = local_segment_path(local_tablet->tablet_path(), rowset_meta->rowset_id().to_string(), segment_index); @@ -314,9 +316,7 @@ void _ingest_binlog(StorageEngine& engine, IngestBinlogArg* arg) { download_success_files.push_back(segment_path); std::string remote_file_md5; - if (config::enable_download_md5sum_check) { - RETURN_IF_ERROR(client->get_content_md5(&remote_file_md5)); - } + RETURN_IF_ERROR(client->get_content_md5(&remote_file_md5)); LOG(INFO) << "download segment file to " << segment_path << ", remote md5: " << remote_file_md5 << ", remote size: " << segment_file_size; @@ -472,8 +472,11 @@ void _ingest_binlog(StorageEngine& engine, IngestBinlogArg* arg) { DCHECK(segment_index_file_names.size() == segment_index_file_urls.size()); for (int64_t i = 0; i < segment_index_file_urls.size(); ++i) { auto segment_index_file_size = segment_index_file_sizes[i]; - auto get_segment_index_file_url = - fmt::format("{}&acquire_md5=true", segment_index_file_urls[i]); + auto get_segment_index_file_url = segment_index_file_urls[i]; + if (config::enable_download_md5sum_check) { + get_segment_index_file_url = + fmt::format("{}&acquire_md5=true", get_segment_index_file_url); + } uint64_t estimate_timeout = estimate_download_timeout(segment_index_file_size); auto local_segment_index_path = segment_index_file_names[i]; @@ -488,9 +491,7 @@ void _ingest_binlog(StorageEngine& engine, IngestBinlogArg* arg) { download_success_files.push_back(local_segment_index_path); std::string remote_file_md5; - if (config::enable_download_md5sum_check) { - RETURN_IF_ERROR(client->get_content_md5(&remote_file_md5)); - } + RETURN_IF_ERROR(client->get_content_md5(&remote_file_md5)); std::error_code ec; // Check file length --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org