This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new 7d521ce288f branch-2.1: [fix](binlog) avoid adding acqurie_md5 param
when enable_download_md5… #48573 (#49004)
7d521ce288f is described below
commit 7d521ce288f8a19d7690ffd8deb433992a198d69
Author: walter <[email protected]>
AuthorDate: Fri Mar 14 11:18:51 2025 +0800
branch-2.1: [fix](binlog) avoid adding acqurie_md5 param when
enable_download_md5… #48573 (#49004)
cherry pick from #48573
---
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 9c8080ddaad..a6a5ba898ac 100644
--- a/be/src/service/backend_service.cpp
+++ b/be/src/service/backend_service.cpp
@@ -290,8 +290,10 @@ void _ingest_binlog(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 local_segment_path = BetaRowset::segment_file_path(
local_tablet->tablet_path(), rowset_meta->rowset_id(),
segment_index);
@@ -306,9 +308,7 @@ void _ingest_binlog(IngestBinlogArg* arg) {
download_success_files.push_back(local_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 " << local_segment_path
<< ", remote md5: " << remote_file_md5
<< ", remote size: " << segment_file_size;
@@ -463,8 +463,11 @@ void _ingest_binlog(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];
@@ -479,9 +482,7 @@ void _ingest_binlog(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: [email protected]
For additional commands, e-mail: [email protected]