Skip to main content

Module shard

Module shard 

Source
Expand description

Key hash shards.

The key space of a family is split into 2^bits shards by the leading bits of the key hash. Commits split their SST files at shard boundaries and compaction merges each shard on its own, so SST files never span a shard boundary. Since shards are hash prefixes, doubling the shard count splits every shard exactly in half.

Structsยง

ShardBits
The number of leading key hash bits that select the shard, i.e. a family has 2^bits shards.