dataroaring commented on code in PR #48965:
URL: https://github.com/apache/doris/pull/48965#discussion_r2000055556


##########
be/src/olap/storage_engine.cpp:
##########
@@ -1134,7 +1134,16 @@ Status StorageEngine::_do_sweep(const std::string& 
scan_root, const time_t& loca
             // eg: 20190818221123.3.86400, the 86400 is timeout, in second
             size_t pos = dir_name.find('.', str_time.size() + 1);
             if (pos != string::npos) {
-                actual_expire = std::stoi(dir_name.substr(pos + 1));
+                try {
+                    actual_expire = std::stoi(dir_name.substr(pos + 1));
+                } catch (const std::invalid_argument& e) {
+                    LOG(WARNING) << "Invalid expiration value format in 
dir_name: " << dir_name
+                                 << ",error: " << e.what();
+                    actual_expire = 0;

Review Comment:
   do not set it to zero.



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