This is an automated email from the ASF dual-hosted git repository. w41ter pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 69b6e145fcd [chore](be) Improve ingesting binlog error checking (#36487) 69b6e145fcd is described below commit 69b6e145fcd8daa9b03ac0c3f7ef79b6fa68a62b Author: walter <w41te...@gmail.com> AuthorDate: Wed Jun 19 11:44:36 2024 +0800 [chore](be) Improve ingesting binlog error checking (#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 ad8e793306e..1b2034a0e21 100644 --- a/be/src/service/backend_service.cpp +++ b/be/src/service/backend_service.cpp @@ -166,10 +166,25 @@ void _ingest_binlog(StorageEngine& engine, 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