This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 30e3c5bbe6 [bugfix](file cache) Fix the init file cache coredump
(#23464)
30e3c5bbe6 is described below
commit 30e3c5bbe629f56a650ba9459539f9f5033ead82
Author: Lightman <[email protected]>
AuthorDate: Sat Aug 26 16:50:50 2023 +0800
[bugfix](file cache) Fix the init file cache coredump (#23464)
* [bugfix](file cache) Fix the init file cache coredump
* fix compile
---
be/src/service/doris_main.cpp | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/be/src/service/doris_main.cpp b/be/src/service/doris_main.cpp
index 4829b45cc7..f1c98ebd4b 100644
--- a/be/src/service/doris_main.cpp
+++ b/be/src/service/doris_main.cpp
@@ -408,32 +408,25 @@ int main(int argc, char** argv) {
.set_max_threads(cache_paths.size())
.build(&file_cache_init_pool);
- std::vector<doris::Status> cache_status;
+ std::list<doris::Status> cache_status;
for (auto& cache_path : cache_paths) {
if (cache_path_set.find(cache_path.path) != cache_path_set.end()) {
LOG(WARNING) << fmt::format("cache path {} is duplicate",
cache_path.path);
continue;
}
- cache_status.push_back(Status::OK());
RETURN_IF_ERROR(file_cache_init_pool->submit_func(
std::bind(&doris::io::FileCacheFactory::create_file_cache,
&(doris::io::FileCacheFactory::instance()),
cache_path.path,
- cache_path.init_settings(),
&(cache_status.back()))));
+ cache_path.init_settings(),
&(cache_status.emplace_back()))));
cache_path_set.emplace(cache_path.path);
- // Status st =
doris::io::FileCacheFactory::instance().create_file_cache(
- // cache_path.path, cache_path.init_settings());
- // if (!st) {
- // LOG(FATAL) << st;
- // exit(-1);
- // }
}
file_cache_init_pool->wait();
- for (int i = 0; i < cache_status.size(); ++i) {
- if (!cache_status[i].ok()) {
- LOG(FATAL) << "failed to init file cache: " << i << ", err: "
<< cache_status[i];
+ for (const auto& status : cache_status) {
+ if (!status.ok()) {
+ LOG(FATAL) << "failed to init file cache, err: " << status;
exit(-1);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]