ShuffleShardExpectedInstances returns the total number of instances that should be selected for a given tenant. If zone-aware replication is disabled, the input numZones should be 1.
(shardSize, numZones int)
| 45 | // ShuffleShardExpectedInstances returns the total number of instances that should be selected for a given |
| 46 | // tenant. If zone-aware replication is disabled, the input numZones should be 1. |
| 47 | func ShuffleShardExpectedInstances(shardSize, numZones int) int { |
| 48 | return ShuffleShardExpectedInstancesPerZone(shardSize, numZones) * numZones |
| 49 | } |
| 50 | |
| 51 | // DynamicShardSize returns the shard size as a percentage of numInstances if the value is < 1. If the value is >= 1, the value is rounded and returned. |
| 52 | func DynamicShardSize(value float64, numInstances int) int { |