Skip to content

Commit 2265d08

Browse files
committed
Remove "one" replicates option
Choosing this option is a mistake.
1 parent 4de8242 commit 2265d08

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

config.example.toml

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ peer_address = "127.0.0.1:9001"
1919
# The amount of replicas of the blob stored, available options:
2020
# - `all': all nodes store all blobs (default). Highest availability, lowest
2121
# chance of data lost, but highest amount of storage used.
22-
# - `one': a single node stores a blob. Lowest availability, highest chance of
23-
# data lost, but lowest amount of storage used.
2422
# - `majority': (N/2)+1 nodes store a blob, where N is the total number of nodes
2523
# in the system. Medium availability, medium chance of data lost, medium
2624
# amount of storage used.

src/config.rs

-4
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ pub struct Distributed {
103103
pub enum Replicas {
104104
/// All nodes store all blobs (default).
105105
All,
106-
/// A single node stores a blob.
107-
One,
108106
/// `(N/2)+1` nodes store a blob, where `N` is the total number of nodes in
109107
/// the system.
110108
Majority,
@@ -120,7 +118,6 @@ impl fmt::Display for Replicas {
120118
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
121119
match self {
122120
Replicas::All => f.write_str("all"),
123-
Replicas::One => f.write_str("one"),
124121
Replicas::Majority => f.write_str("majority"),
125122
}
126123
}
@@ -141,7 +138,6 @@ impl FromStr for Replicas {
141138
fn from_str(s: &str) -> Result<Self, Self::Err> {
142139
match s {
143140
"all" => Ok(Replicas::All),
144-
"one" => Ok(Replicas::One),
145141
"majority" => Ok(Replicas::Majority),
146142
_ => Err(ParseReplicasErr(())),
147143
}

0 commit comments

Comments
 (0)