github-actions[bot] commented on code in PR #24229: URL: https://github.com/apache/doris/pull/24229#discussion_r1349654786
########## be/src/agent/task_worker_pool.cpp: ########## @@ -1094,6 +1100,20 @@ void TaskWorkerPool::_handle_report(const TReportRequest& request, ReportType ty } } +void TaskWorkerPool::_set_disk_infos(TReportRequest& request, DiskType type) { + SpecialDirInfo dir_info; + StorageEngine::instance()->get_special_dir_info(&dir_info, type); + + TDisk special_disk; Review Comment: warning: variable 'special_disk' is not initialized [cppcoreguidelines-init-variables] ```suggestion TDisk special_disk = 0; ``` ########## be/src/olap/storage_engine.cpp: ########## @@ -357,6 +359,25 @@ Status StorageEngine::get_all_data_dir_info(std::vector<DataDirInfo>* data_dir_i return res; } +void StorageEngine::get_special_dir_info(SpecialDirInfo* special_dir_infos, + TaskWorkerPool::DiskType type) { + switch (type) { + case TaskWorkerPool::DiskType::LOG: + _log_dir->health_check(); + _log_dir->update_capacity(); + _log_dir->get_dir_info(special_dir_infos); + break; + case TaskWorkerPool::DiskType::DEPLOY: + _deploy_dir->health_check(); + _deploy_dir->update_capacity(); + _deploy_dir->get_dir_info(special_dir_infos); + break; + default: + break; + } + return; +} Review Comment: warning: redundant return statement at the end of a function with a void return type [readability-redundant-control-flow] ```suggestion } ``` -- 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