Linear hash
在阅读 时,其中提及了linear hash:
Linear hash sharding is a hybrid between hash and range sharding that preserves the sort order of the rows by utilizing a linear hash function instead of a regular random hash function to compute how to shard the rows. A linear hash function, sometimes referred to as an order preserving hash, is a hash function that maintains the relative ordering of input values while changing their distribution spacing. This type of sharding preserves the sort ordering of the rows, while redistributing these rows across a larger key space. The idea is that the larger key space over which the redistribution of rows is done can be pre-sharded, enabling the table to be spread across multiple nodes.
显然,linear hash的一个显著的特性是: 输出和深入是保持相同的order。
xlinux linear hash
Definition: A numeric function that maintains the order of input keys while changing their spacing.