[improve](disk) Not add disk path to broken list if check status is not IO_ERROR (#34111)
This commit is contained in:
@ -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<IO_ERROR>()) {
|
||||
LOG(WARNING) << "store read/write test file occur IO Error. path=" << _path
|
||||
<< ", err: " << res;
|
||||
StorageEngine::instance()->add_broken_path(_path);
|
||||
|
||||
@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user