empiredan commented on code in PR #1512:
URL:
https://github.com/apache/incubator-pegasus/pull/1512#discussion_r1221178367
##########
src/replica/replica_2pc.cpp:
##########
@@ -179,8 +180,7 @@ void replica::on_client_write(dsn::message_ex *request,
bool ignore_throttling)
}
if (FLAGS_reject_write_when_disk_insufficient &&
- (_dir_node->status == disk_status::SPACE_INSUFFICIENT ||
- _primary_states.secondary_disk_space_insufficient())) {
+ (_dir_node->status != disk_status::NORMAL ||
_primary_states.secondary_disk_abnormal())) {
response_client_write(request, ERR_DISK_INSUFFICIENT);
Review Comment:
Reply with real error, `ERR_DISK_IO_ERROR` or `ERR_DISK_INSUFFICIENT` ?
##########
src/replica/replica_stub.cpp:
##########
@@ -618,6 +618,10 @@ void replica_stub::initialize(const replication_options
&opts, bool clear /* = f
LOG_INFO("start to load replicas");
std::map<dir_node *, std::vector<std::string>> dirs_by_dn;
for (const auto &dn : _fs_manager.get_dir_nodes()) {
+ // Skip IO error dir_node.
+ if (dn->status == disk_status::IO_ERROR) {
Review Comment:
The reason why do not check `dn->status != disk_status::NORMAL` is that even
if the status is `disk_status::SPACE_INSUFFICIENT` we could still just read
this disk rather than writing into it ? Once current status is
`disk_status::SPACE_INSUFFICIENT` should we reject any write ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]