This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch branch-4.0-preview
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 17dadfe19b9f00ea941ac36a20247e253cc1a431
Author: zxealous <zhouchang...@baidu.com>
AuthorDate: Thu Apr 25 21:32:16 2024 +0800

    [improve](disk) 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 d1b5185b789..da7302ef605 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<IO_ERROR>()) {
             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 731e09c6be9..98712a8168b 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 {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to