@earth-app/collegedb
    Preparing search index...

    Function legacyModuloShard

    • Selects a shard the way CollegeDB did before 1.4.0.

      Retained only so the modulo epoch can resolve keys placed by an earlier version. Do not use for new placement: it is sensitive to the order shards is declared in, and changing the shard count relocates almost every key.

      Parameters

      • key: string

        Primary key to place

      • shards: string[]

        Candidate shard bindings, in the order the old config had them

      Returns string

      The shard binding the pre-1.4.0 algorithm would have chosen

      If shards is empty

      1.4.0