diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/db/Cargo.toml | 1 | ||||
-rw-r--r-- | src/model/Cargo.toml | 3 | ||||
-rw-r--r-- | src/rpc/layout.rs | 8 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/db/Cargo.toml b/src/db/Cargo.toml index 62dda2ca..82cf49dc 100644 --- a/src/db/Cargo.toml +++ b/src/db/Cargo.toml @@ -33,6 +33,7 @@ pretty_env_logger = { version = "0.4", optional = true } mktemp = "0.4" [features] +default = [ "sled" ] bundled-libs = [ "rusqlite/bundled" ] cli = ["clap", "pretty_env_logger"] lmdb = [ "heed" ] diff --git a/src/model/Cargo.toml b/src/model/Cargo.toml index 2c2e2bfe..08baf81f 100644 --- a/src/model/Cargo.toml +++ b/src/model/Cargo.toml @@ -14,7 +14,7 @@ path = "lib.rs" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -garage_db = { version = "0.8.0", path = "../db" } +garage_db = { version = "0.8.0", default-features = false, path = "../db" } garage_rpc = { version = "0.8.0", path = "../rpc" } garage_table = { version = "0.8.0", path = "../table" } garage_block = { version = "0.8.0", path = "../block" } @@ -42,6 +42,7 @@ opentelemetry = "0.17" netapp = "0.5" [features] +default = [ "sled" ] k2v = [ "garage_util/k2v" ] lmdb = [ "garage_db/lmdb" ] sled = [ "garage_db/sled" ] diff --git a/src/rpc/layout.rs b/src/rpc/layout.rs index f517f36f..2fd5acfc 100644 --- a/src/rpc/layout.rs +++ b/src/rpc/layout.rs @@ -254,9 +254,11 @@ To know the correct value of the new layout version, invoke `garage layout show` match self.initial_partition_assignation() { Some(initial_partitions) => { for (part, ipart) in partitions.iter_mut().zip(initial_partitions.iter()) { - for (id, info) in ipart.nodes.iter() { - if part.nodes.len() < self.replication_factor { - part.add(None, n_zones, id, info.unwrap()); + for _ in 0..2 { + for (id, info) in ipart.nodes.iter() { + if part.nodes.len() < self.replication_factor { + part.add(None, n_zones, id, info.unwrap()); + } } } assert!(part.nodes.len() == self.replication_factor); |