diff --git a/be/src/olap/data_dir.cpp b/be/src/olap/data_dir.cpp index 96b6c90129..72604bcca9 100644 --- a/be/src/olap/data_dir.cpp +++ b/be/src/olap/data_dir.cpp @@ -239,7 +239,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 6045530048..00aa476146 100644 --- a/be/src/service/doris_main.cpp +++ b/be/src/service/doris_main.cpp @@ -435,6 +435,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 {