From 57c089143394b4160a4e0ec17f5edd095e330c7d Mon Sep 17 00:00:00 2001 From: zxealous Date: Thu, 25 Apr 2024 14:15:33 +0800 Subject: [PATCH] [improve](disk) Not add disk path to broken list if check status is not IO_ERROR --- 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 d1b5185b7894ce..da7302ef605445 100644 --- a/be/src/olap/data_dir.cpp +++ b/be/src/olap/data_dir.cpp @@ -231,7 +231,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; _engine.add_broken_path(_path); diff --git a/be/src/service/doris_main.cpp b/be/src/service/doris_main.cpp index 731e09c6be9fc2..98712a8168be5a 100644 --- a/be/src/service/doris_main.cpp +++ b/be/src/service/doris_main.cpp @@ -439,6 +439,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 {