aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/layout/schema.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-11-08 19:28:36 +0100
committerAlex Auvolat <alex@adnab.me>2023-11-08 19:28:36 +0100
commit8dccee3ccfe7793c42203f28c1e91c6f989b6899 (patch)
tree0a3fdb60229d9e3c9d61c7f01d40ed74159f1b2c /src/rpc/layout/schema.rs
parentfe9af1dcaae31a117528a9cfa10c422c9a850201 (diff)
downloadgarage-8dccee3ccfe7793c42203f28c1e91c6f989b6899.tar.gz
garage-8dccee3ccfe7793c42203f28c1e91c6f989b6899.zip
cluster layout: adapt all uses of ClusterLayout to LayoutHistory
Diffstat (limited to 'src/rpc/layout/schema.rs')
-rw-r--r--src/rpc/layout/schema.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rpc/layout/schema.rs b/src/rpc/layout/schema.rs
index fa0822fa..14e797be 100644
--- a/src/rpc/layout/schema.rs
+++ b/src/rpc/layout/schema.rs
@@ -184,7 +184,6 @@ mod v010 {
use garage_util::data::{Hash, Uuid};
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
- use std::sync::Arc;
pub use v09::{LayoutParameters, NodeRole, NodeRoleV, ZoneRedundancy};
/// The layout of the cluster, i.e. the list of roles
@@ -215,7 +214,7 @@ mod v010 {
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct LayoutHistory {
/// The versions currently in use in the cluster
- pub versions: Arc<[LayoutVersion]>,
+ pub versions: Vec<LayoutVersion>,
/// Update trackers
pub update_trackers: UpdateTrackers,
@@ -267,7 +266,7 @@ mod v010 {
.collect::<HashMap<Uuid, u64>>(),
);
let mut ret = Self {
- versions: Arc::from(vec![version].into_boxed_slice()),
+ versions: vec![version],
update_trackers: UpdateTrackers {
ack_map: update_tracker.clone(),
sync_map: update_tracker.clone(),