-
Notifications
You must be signed in to change notification settings - Fork 59
feat(disk): add broken disk check while initialize #834
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
std::string err_msg; | ||
int count = 0; | ||
std::vector<std::string> available_dirs; | ||
std::vector<std::string> available_dir_tags; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe you should assert data_dirs.size() == data_dir_tags.size() here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data_dirs and data_dirs_tags are _options.data_dirs
and _options.data_dir_tags
, you can reference how them set in replication_common.cpp
function initialize
, I don't add a link here because it will be refactored by pull request 831.
The case need add perf-counter and let user know it in time |
This pull request adds disk check while initialize. We choose the way that doris used. When the disk path is found, we will try to write and read data to check if the disk is broken. If the disk is broken, it will be excluded and replica instance can start. In previous implmenetation, if a disk is broken, replica server will core and never start until the broken disk removed.
This pull request also adds related unit tests and configuration.
[replication] +ignore_broken_disk=true