diff options
author | Alex Auvolat <alex@adnab.me> | 2022-06-10 11:27:58 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-06-10 11:27:58 +0200 |
commit | 180e7fef0a1bdd396865eff92ec6f1d7f0e7511e (patch) | |
tree | 46c5c358b12e2c86d56ad92a4a51640c428d93dd /src/model | |
parent | c054de43dd3ccbf6a884f73a474b423bbab41d08 (diff) | |
download | garage-180e7fef0a1bdd396865eff92ec6f1d7f0e7511e.tar.gz garage-180e7fef0a1bdd396865eff92ec6f1d7f0e7511e.zip |
Actually distribute counters over nodes
Diffstat (limited to 'src/model')
-rw-r--r-- | src/model/s3/object_table.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/model/s3/object_table.rs b/src/model/s3/object_table.rs index 23cce1d3..f3c8a3fb 100644 --- a/src/model/s3/object_table.rs +++ b/src/model/s3/object_table.rs @@ -302,17 +302,17 @@ impl TableSchema for ObjectTable { impl CountedItem for Object { const COUNTER_TABLE_NAME: &'static str = "bucket_object_counter"; - // Partition key = nothing - type CP = EmptyKey; - // Sort key = bucket id - type CS = Uuid; + // Partition key = bucket id + type CP = Uuid; + // Sort key = nothing + type CS = EmptyKey; - fn counter_partition_key(&self) -> &EmptyKey { - &EmptyKey - } - fn counter_sort_key(&self) -> &Uuid { + fn counter_partition_key(&self) -> &Uuid { &self.bucket_id } + fn counter_sort_key(&self) -> &EmptyKey { + &EmptyKey + } fn counts(&self) -> Vec<(&'static str, i64)> { let versions = self.versions(); |