From 6498eb2f57db5daad0674bb4176ddb1007caf030 Mon Sep 17 00:00:00 2001 From: zxealous Date: Thu, 25 Apr 2024 21:32:16 +0800 Subject: [PATCH] [branch-2.0](cherry-pick) Not add disk path to broken list if check status is not IO_ERROR (#34111) --- be/src/olap/data_dir.cpp | 2 +- be/src/service/doris_main.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/be/src/olap/data_dir.cpp b/be/src/olap/data_dir.cpp index 985eea3d914794..f41b2894389c1e 100644 --- a/be/src/olap/data_dir.cpp +++ b/be/src/olap/data_dir.cpp @@ -236,7 +236,7 @@ void DataDir::health_check() { // check disk if (_is_used) { Status res = _read_and_write_test_file(); - if (!res) { + if (!res && res.is()) { LOG(WARNING) << "store read/write test file occur IO Error. path=" << _path << ", err: " << res; StorageEngine::instance()->add_broken_path(_path); diff --git a/be/src/service/doris_main.cpp b/be/src/service/doris_main.cpp index 1a9c0d5102e691..19259b5e3da9c2 100644 --- a/be/src/service/doris_main.cpp +++ b/be/src/service/doris_main.cpp @@ -373,6 +373,7 @@ int main(int argc, char** argv) { it = paths.erase(it); } else { LOG(ERROR) << "read write test file failed, path=" << it->path; + // if only one disk and the disk is full, also need exit because rocksdb will open failed exit(-1); } } else {