mymeiyi commented on code in PR #27726: URL: https://github.com/apache/doris/pull/27726#discussion_r1425036466
########## be/src/http/action/http_stream.cpp: ########## @@ -182,12 +183,22 @@ int HttpStreamAction::on_header(HttpRequest* req) { if (!group_commit_mode.empty() || config::wait_internal_group_commit_finish) { ctx->group_commit = load_size_smaller_than_wal_limit(req); if (!ctx->group_commit) { - LOG(WARNING) << "The data size for this http load(" - << std::stol(req->header(HttpHeaders::CONTENT_LENGTH)) - << " Bytes) exceeds the WAL (Write-Ahead Log) limit (" - << config::wal_max_disk_size * 0.8 - << " Bytes). Please set this load to \"group commit\"=false."; - st = Status::InternalError("Http load size too large."); + std::stringstream err_msg; + const auto& map = ExecEnv::GetInstance()->wal_mgr()->get_wal_dir_to_max_limit_map(); + err_msg << "When enable group commit, the data size can't be too large. The data size " + "for this http load(" + << (req->header(HttpHeaders::CONTENT_LENGTH).empty() + ? 0 + : std::stol(req->header(HttpHeaders::CONTENT_LENGTH))) + << " Bytes) exceeds the WAL (Write-Ahead Log) limit (" + << std::max_element(map.begin(), map.end(), Review Comment: It's better to abstract a function to get the max limit wal dir -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org