aboutsummaryrefslogtreecommitdiff
path: root/src/table
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-12-22 18:50:08 +0100
committerAlex Auvolat <alex@adnab.me>2022-01-04 12:47:28 +0100
commitd8ab5bdc3e20759e5ba8a6844393757da3539372 (patch)
tree7fc9abc578bb4185691313889ed94aedca09dbc4 /src/table
parentc7d5c732442c5802058b46205d450d4620772b7b (diff)
downloadgarage-d8ab5bdc3e20759e5ba8a6844393757da3539372.tar.gz
garage-d8ab5bdc3e20759e5ba8a6844393757da3539372.zip
New buckets for 0.6.0: fix model and migration
Diffstat (limited to 'src/table')
-rw-r--r--src/table/schema.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/table/schema.rs b/src/table/schema.rs
index cfe86fba..eba918a2 100644
--- a/src/table/schema.rs
+++ b/src/table/schema.rs
@@ -16,6 +16,9 @@ impl PartitionKey for String {
}
}
+/// Values of type FixedBytes32 are assumed to be random,
+/// either a hash or a random UUID. This means we can use
+/// them directly as an index into the hash table.
impl PartitionKey for FixedBytes32 {
fn hash(&self) -> Hash {
*self