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


##########
be/src/runtime/runtime_state.cpp:
##########
@@ -425,6 +454,17 @@ Status 
RuntimeState::append_error_msg_to_file(std::function<std::string()> line,
     return Status::OK();
 }
 
+std::string RuntimeState::get_error_log_file_path() const {
+    if (config::save_load_error_log_to_s3 && config::is_cloud_mode()) {
+        // expiration must be less than a week (in seconds) for presigned url
+        static const unsigned EXPIRATION_SECONDS = 7 * 24 * 60 * 60 - 1;
+        // We should return a public endpoint to user.
+        return std::dynamic_pointer_cast<io::S3FileSystem>(_s3_error_fs)

Review Comment:
   We need to check every cast 
`std::dynamic_pointer_cast<io::S3FileSystem>(_s3_error_fs)` 
   because it may be nullptr if the storage backend is HDFS only.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to