github-actions[bot] commented on code in PR #29688: URL: https://github.com/apache/doris/pull/29688#discussion_r1444677469
########## be/src/olap/wal/wal_manager.cpp: ########## @@ -97,67 +97,74 @@ if (std::filesystem::path(wal_dir).is_absolute()) { tmp_dirs.emplace_back(wal_dir); } else { - return Status::InternalError( - "BE config group_commit_replay_wal_dir has to be absolute path!"); + LOG(WARNING) << "BE config group_commit_replay_wal_dir" << wal_dir + << "has to be absolute path!"; } } } _wal_dirs = tmp_dirs; - return Status::OK(); } -Status WalManager::_init_wal_dirs() { +void WalManager::_init_wal_dirs() { Review Comment: warning: method '_init_wal_dirs' can be made static [readability-convert-member-functions-to-static] be/src/olap/wal/wal_manager.h:89: ```diff - void _init_wal_dirs(); + static void _init_wal_dirs(); ``` ########## be/src/olap/wal/wal_manager.cpp: ########## @@ -84,7 +84,7 @@ Status WalManager::init() { &_replay_thread); } -Status WalManager::_init_wal_dirs_conf() { +void WalManager::_init_wal_dirs_conf() { Review Comment: warning: method '_init_wal_dirs_conf' can be made static [readability-convert-member-functions-to-static] be/src/olap/wal/wal_manager.h:88: ```diff - void _init_wal_dirs_conf(); + static void _init_wal_dirs_conf(); ``` ########## be/src/olap/wal/wal_manager.cpp: ########## @@ -97,67 +97,74 @@ if (std::filesystem::path(wal_dir).is_absolute()) { tmp_dirs.emplace_back(wal_dir); } else { - return Status::InternalError( - "BE config group_commit_replay_wal_dir has to be absolute path!"); + LOG(WARNING) << "BE config group_commit_replay_wal_dir" << wal_dir + << "has to be absolute path!"; } } } _wal_dirs = tmp_dirs; - return Status::OK(); } -Status WalManager::_init_wal_dirs() { +void WalManager::_init_wal_dirs() { bool exists = false; for (auto wal_dir : _wal_dirs) { std::string tmp_dir = wal_dir + "/" + _tmp; LOG(INFO) << "wal_dir:" << wal_dir << ",tmp_dir:" << tmp_dir; - RETURN_IF_ERROR(io::global_local_filesystem()->exists(wal_dir, &exists)); + WARN_IF_ERROR(io::global_local_filesystem()->exists(wal_dir, &exists), + "check wal dir exists failed!"); if (!exists) { - RETURN_IF_ERROR(io::global_local_filesystem()->create_directory(wal_dir)); + WARN_IF_ERROR(io::global_local_filesystem()->create_directory(wal_dir), + "create wal dir failed!"); } - RETURN_IF_ERROR(io::global_local_filesystem()->exists(tmp_dir, &exists)); + WARN_IF_ERROR(io::global_local_filesystem()->exists(tmp_dir, &exists), + "check tmp dir exists failed!"); if (!exists) { - RETURN_IF_ERROR(io::global_local_filesystem()->create_directory(tmp_dir)); + WARN_IF_ERROR(io::global_local_filesystem()->create_directory(tmp_dir), + "create tmp dir failed!"); } } - return Status::OK(); } -Status WalManager::_init_wal_dirs_info() { +void WalManager::_init_wal_dirs_info() { Review Comment: warning: method '_init_wal_dirs_info' can be made static [readability-convert-member-functions-to-static] be/src/olap/wal/wal_manager.h:90: ```diff - void _init_wal_dirs_info(); + static void _init_wal_dirs_info(); ``` -- 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