gavinchou commented on code in PR #35807:
URL: https://github.com/apache/doris/pull/35807#discussion_r1624304396


##########
be/src/http/utils.cpp:
##########
@@ -163,6 +161,17 @@ void do_file_response(const std::string& file_path, 
HttpRequest* req,
 
     req->add_output_header(HttpHeaders::CONTENT_TYPE, 
get_content_type(file_path).c_str());
 
+    if (is_acquire_md5) {
+        Md5Digest md5;
+
+        void* buf = mmap(nullptr, file_size, PROT_READ, MAP_SHARED, fd, 0);

Review Comment:
   do we need to check return values of  mmap() and  munmap()



-- 
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

Reply via email to