freemandealer commented on code in PR #43440: URL: https://github.com/apache/doris/pull/43440#discussion_r1855756613
########## be/src/http/action/file_cache_action.cpp: ########## @@ -127,6 +129,25 @@ Status FileCacheAction::_handle_header(HttpRequest* req, std::string* json_metri *json_metrics = json.ToString(); } } + } else if (operation == LIST_BASE_PATHS) { + auto all_cache_base_path = io::FileCacheFactory::instance()->get_base_paths(); + EasyJson json; + std::for_each(all_cache_base_path.begin(), all_cache_base_path.end(), + [&json](auto& x) { json.PushBack(std::move(x)); }); + *json_metrics = json.ToString(); + } else if (operation == CHECK_CONSISTENCY) { + const std::string& cache_base_path = req->param(BASE_PATH.data()); + if (cache_base_path.empty()) { + st = Status::InvalidArgument("missing parameter: {} is required", VALUE.data()); + } else { + auto* block_file_cache = io::FileCacheFactory::instance()->get_by_path(cache_base_path); Review Comment: if (!block_file_cache) { st = Status::InvalidArgument("invalid path: {}", VALUE.data()); return st; } -- 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