empiredan commented on code in PR #1035: URL: https://github.com/apache/incubator-pegasus/pull/1035#discussion_r916449578
########## rdsn/src/replica/replica.cpp: ########## @@ -581,5 +581,10 @@ error_code replica::store_app_info(app_info &info, const std::string &path) return err; } +int32_t replica::mutation_2pc_min_replica_count() +{ + return std::min(_options->mutation_2pc_min_replica_count, _app_info.max_replica_count - 1); Review Comment: Should this be compared as follows ? ```c++ return std::min({_options->mutation_2pc_min_replica_count, _app_info.max_replica_count - 1, 1}); ``` Since for single replica `max_replica_count` is 1, then `std::min(_options->mutation_2pc_min_replica_count, _app_info.max_replica_count - 1)` will be 0. -- 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: dev-unsubscr...@pegasus.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pegasus.apache.org For additional commands, e-mail: dev-h...@pegasus.apache.org