In addition to the existing hashing method for StaticShardedDO add the jump consistent hash function introduced for the dynamic autoscaled DO:
|
function consistentHash(key: number, numBuckets: number): number { |
Extend the options in https://github.com/lambrospetrou/durable-utils/blob/main/src/do-sharding.ts#L16 to accept the hash function as option, and use the existing xxHash as default to avoid breakage, and only change the default in v1.0.
In addition to the existing hashing method for
StaticShardedDOadd the jump consistent hash function introduced for the dynamic autoscaled DO:durable-utils/src/experimental/autoscaled-sharded-do.ts
Line 380 in b362ede
Extend the options in https://github.com/lambrospetrou/durable-utils/blob/main/src/do-sharding.ts#L16 to accept the hash function as option, and use the existing
xxHashas default to avoid breakage, and only change the default inv1.0.