This commit is contained in:
Christian Schwarz
2025-06-03 14:00:56 +02:00
parent df36b9aa62
commit 88a3c9e7fd
3 changed files with 191 additions and 34 deletions

View File

@@ -319,9 +319,18 @@ pub enum TenantShardPageserverAttachmentChange {
Detach(TenantShardPageserverAttachment),
}
impl TenantShardPageserverAttachmentChange {
pub fn attachment(&self) -> TenantShardPageserverAttachment {
match self {
TenantShardPageserverAttachmentChange::Attach(a) => a,
TenantShardPageserverAttachmentChange::Detach(a) => a,
}
}
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct TenantShardPageserverAttachment {
pub shard: ShardIndex,
pub shard_id: ShardIndex,
pub generation: Generation,
pub ps_id: NodeId,
}