/** * Returns the distribution bits this cluster should use. * On Hosted Vespa this is hardcoded and not computed from the nodes because reducing the number of nodes is a common * operation, while reducing the number of distribution bits can lead to consistency problems. * This hardcoded value should work fine from 1-200 nodes. Those who have more will need to set this value * in config and not remove it again if they reduce the node count. */ public int distributionBits() { if (zone.environment() == Environment.prod && ! zone.equals(Zone.defaultZone())) { return 16; } else { // hosted test zone, or self-hosted system // hosted test zones: have few nodes and use visiting in tests: This is slow with 16 bits (to many buckets) // self hosted systems: should probably default to 16 bits, but the transition may cause problems return DistributionBitCalculator.getDistributionBits(getNodeCountPerGroup(), getDistributionMode()); } }