yujun777 commented on code in PR #24639:
URL: https://github.com/apache/doris/pull/24639#discussion_r1330920375


##########
be/src/olap/storage_engine.cpp:
##########
@@ -1379,4 +1381,35 @@ void StorageEngine::evict_querying_rowset(RowsetId 
rs_id) {
     _querying_rowsets.erase(rs_id);
 }
 
+bool StorageEngine::add_broken_path(std::string path) {
+    std::lock_guard<std::mutex> lock(_broken_paths_mutex);
+    auto success = _broken_paths.emplace(path).second;
+    if (success) {
+        _persist_broken_paths();
+    }
+    return success;
+}
+
+bool StorageEngine::remove_broken_path(std::string path) {
+    std::lock_guard<std::mutex> lock(_broken_paths_mutex);
+    auto count = _broken_paths.erase(path);
+    if (count > 1) {
+        _persist_broken_paths();
+    }
+    return count > 1;
+}
+
+Status StorageEngine::_persist_broken_paths() {
+    std::string config_value;
+    for (const std::string& path : _broken_paths) {
+        config_value += path + ";";

Review Comment:
   util/string_util.h has a function join(strings,  delim)



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