Skip to content

Commit f219ed5

Browse files
authored
During the startup of BE, it needs to check whether the path in broken_storage_path can be read and written normally.
During the startup of BE, if broken_storage_path is configured, it needs to check whether the corresponding path IO is normal. If all is normal, the BE will be allowed to start up.
1 parent fb4e140 commit f219ed5

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

be/src/service/doris_main.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,16 @@ int main(int argc, char** argv) {
437437
LOG(WARNING) << "ignore broken disk, path = " << it->path;
438438
it = paths.erase(it);
439439
} else {
440-
LOG(ERROR) << "a broken disk is found " << it->path;
441-
exit(-1);
440+
LOG(ERROR) << "a broken disk is found, check it " << it->path;
441+
// if broken path can be read and write(IO ok),remove the broken path at BE start.
442+
if (doris::check_datapath_rw(it->path)) {
443+
LOG(INFO) << " broken path=" << it->path << " is IO Ok. remove it on broken path.";
444+
broken_paths.erase(it->path);
445+
continue;
446+
} else {
447+
LOG(ERROR) << " broken path=" << it->path << " is IO Error,can't start.";
448+
exit(-1);
449+
}
442450
}
443451
} else if (!doris::check_datapath_rw(it->path)) {
444452
if (doris::config::ignore_broken_disk) {

0 commit comments

Comments
 (0)