empiredan commented on PR #1035:
URL: 
https://github.com/apache/incubator-pegasus/pull/1035#issuecomment-1181280810

   Should we also add new `mutation_2pc_min_replica_count()` into 
`partition_health_status()` ? Since it also uses 
`mutation_2pc_min_replica_count` to decide if a partition is unwritable:
   
   ```c++
   inline health_status partition_health_status(const partition_configuration 
&pc,
                                                int 
mutation_2pc_min_replica_count)
   {
       if (pc.primary.is_invalid()) {
           if (pc.secondaries.empty())
               return HS_DEAD;
           else
               return HS_UNREADABLE;
       } else { // !pc.primary.is_invalid()
           int n = pc.secondaries.size() + 1;
           if (n < mutation_2pc_min_replica_count)
               return HS_UNWRITABLE;
           else if (n < pc.max_replica_count)
               return HS_WRITABLE_ILL;
           else
               return HS_HEALTHY;
       }
   }
   ```


-- 
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]

Reply via email to