storcon: avoid promoting too many shards of the same tenant

This commit is contained in:
Vlad Lazar
2024-06-19 14:12:50 +01:00
parent c789ec21f6
commit 3a74253bcb
2 changed files with 24 additions and 4 deletions

View File

@@ -43,7 +43,7 @@ use utils::id::TenantId;
pub struct ShardNumber(pub u8);
#[derive(Ord, PartialOrd, Eq, PartialEq, Clone, Copy, Serialize, Deserialize, Debug, Hash)]
pub struct ShardCount(u8);
pub struct ShardCount(pub u8);
/// Combination of ShardNumber and ShardCount. For use within the context of a particular tenant,
/// when we need to know which shard we're dealing with, but do not need to know the full