mymeiyi commented on code in PR #29560:
URL: https://github.com/apache/doris/pull/29560#discussion_r1442655940
##########
be/src/olap/wal/wal_manager.cpp:
##########
@@ -507,4 +418,50 @@ std::string WalManager::_get_base_wal_path(const
std::string& wal_path_str) {
return wal_path.string();
}
+Status WalManager::delete_wal(int64_t table_id, int64_t wal_id, size_t
block_queue_pre_allocated) {
+ std::string wal_path;
+ {
+ std::lock_guard<std::shared_mutex> wrlock(_wal_path_lock);
+ auto it = _wal_path_map.find(wal_id);
+ if (it != _wal_path_map.end()) {
+ wal_path = it->second;
+
RETURN_IF_ERROR(io::global_local_filesystem()->delete_file(wal_path));
Review Comment:
should erase from map firstly and then delete file.
And if delete file error, we can just log the error, because the load
already success.
--
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]