This is an automated email from the ASF dual-hosted git repository. dataroaring 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 b3dcfae8647 [chore](be) Improve ingesting binlog error checking (#36596) b3dcfae8647 is described below commit b3dcfae8647e497b634e53433cbfd3507d808d63 Author: walter <w41te...@gmail.com> AuthorDate: Thu Jun 20 20:15:26 2024 +0800 [chore](be) Improve ingesting binlog error checking (#36596) Cherry-pick #36487 --- be/src/service/backend_service.cpp | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/be/src/service/backend_service.cpp b/be/src/service/backend_service.cpp index 6a46cf38408..c4ccaa7281b 100644 --- a/be/src/service/backend_service.cpp +++ b/be/src/service/backend_service.cpp @@ -160,10 +160,25 @@ void _ingest_binlog(IngestBinlogArg* arg) { } std::vector<std::string> binlog_info_parts = strings::Split(binlog_info, ":"); - // TODO(Drogon): check binlog info content is right - DCHECK(binlog_info_parts.size() == 2); - const std::string& remote_rowset_id = binlog_info_parts[0]; - int64_t num_segments = std::stoll(binlog_info_parts[1]); + if (binlog_info_parts.size() != 2) { + status = Status::RuntimeError("failed to parse binlog info into 2 parts: {}", binlog_info); + LOG(WARNING) << "failed to get binlog info from " << get_binlog_info_url + << ", status=" << status.to_string(); + status.to_thrift(&tstatus); + return; + } + std::string remote_rowset_id = std::move(binlog_info_parts[0]); + int64_t num_segments = -1; + try { + num_segments = std::stoll(binlog_info_parts[1]); + } catch (std::exception& e) { + status = Status::RuntimeError("failed to parse num segments from binlog info {}: {}", + binlog_info, e.what()); + LOG(WARNING) << "failed to get binlog info from " << get_binlog_info_url + << ", status=" << status; + status.to_thrift(&tstatus); + return; + } // Step 4: get rowset meta auto get_rowset_meta_url = fmt::format( --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org