rDSN
rDSN copied to clipboard
make mutation_2pc_min_replica_count depending on replica_count of table
Problem
Now the _mutation_2pc_min_replica_count_ is set in config file, and all replicas use the same one, then the problem is: if there are different replicas of different tables which have different _replica_count, then use the same _mutation_2pc_min_replica_count is improper anymore.
Resolution
We can calculate the _mutation_2pc_min_replica_count_ from _partition_configuration.max_replica_count_ to ensure majority, for example:
mutation_2pc_min_replica_count = partition_configuration.max_replica_count / 2 + 1
confused ... I thought you were talking about different apps may have different requirements of reliability (i.e., replica count). In this case, we can put this into the app specific configuration on meta server, which is further broadcasted to the replica servers.
As for majority, our protocol does not really require majority at all as long as we think reliability is enough (e.g., we can have 2 replicas out of 5 being alive in our secondary set).