aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/model')
-rw-r--r--src/model/bucket_alias_table.rs4
-rw-r--r--src/model/bucket_table.rs4
-rw-r--r--src/model/helper/locked.rs2
-rw-r--r--src/model/k2v/rpc.rs4
-rw-r--r--src/model/s3/object_table.rs12
-rw-r--r--src/model/s3/version_table.rs2
-rw-r--r--src/model/snapshot.rs2
7 files changed, 15 insertions, 15 deletions
diff --git a/src/model/bucket_alias_table.rs b/src/model/bucket_alias_table.rs
index 54d7fbad..8bbe4118 100644
--- a/src/model/bucket_alias_table.rs
+++ b/src/model/bucket_alias_table.rs
@@ -89,9 +89,9 @@ pub fn is_valid_bucket_name(n: &str) -> bool {
// Bucket names must start and end with a letter or a number
&& !n.starts_with(&['-', '.'][..])
&& !n.ends_with(&['-', '.'][..])
- // Bucket names must not be formated as an IP address
+ // Bucket names must not be formatted as an IP address
&& n.parse::<std::net::IpAddr>().is_err()
- // Bucket names must not start wih "xn--"
+ // Bucket names must not start with "xn--"
&& !n.starts_with("xn--")
// Bucket names must not end with "-s3alias"
&& !n.ends_with("-s3alias")
diff --git a/src/model/bucket_table.rs b/src/model/bucket_table.rs
index 1dbdfac2..f1cc032e 100644
--- a/src/model/bucket_table.rs
+++ b/src/model/bucket_table.rs
@@ -14,7 +14,7 @@ mod v08 {
/// A bucket is a collection of objects
///
/// Its parameters are not directly accessible as:
- /// - It must be possible to merge paramaters, hence the use of a LWW CRDT.
+ /// - It must be possible to merge parameters, hence the use of a LWW CRDT.
/// - A bucket has 2 states, Present or Deleted and parameters make sense only if present.
#[derive(PartialEq, Eq, Clone, Debug, Serialize, Deserialize)]
pub struct Bucket {
@@ -126,7 +126,7 @@ impl AutoCrdt for BucketQuotas {
}
impl BucketParams {
- /// Create an empty BucketParams with no authorized keys and no website accesss
+ /// Create an empty BucketParams with no authorized keys and no website access
fn new() -> Self {
BucketParams {
creation_date: now_msec(),
diff --git a/src/model/helper/locked.rs b/src/model/helper/locked.rs
index b541d548..43f4f363 100644
--- a/src/model/helper/locked.rs
+++ b/src/model/helper/locked.rs
@@ -231,7 +231,7 @@ impl<'a> LockedHelper<'a> {
let bucket_p_local_alias_key = (key.key_id.clone(), alias_name.clone());
// Calculate the timestamp to assign to this aliasing in the two local_aliases maps
- // (the one from key to bucket, and the reverse one stored in the bucket iself)
+ // (the one from key to bucket, and the reverse one stored in the bucket itself)
// so that merges on both maps in case of a concurrent operation resolve
// to the same alias being set
let alias_ts = increment_logical_clock_2(
diff --git a/src/model/k2v/rpc.rs b/src/model/k2v/rpc.rs
index 4d7186a7..a1bf6ee0 100644
--- a/src/model/k2v/rpc.rs
+++ b/src/model/k2v/rpc.rs
@@ -310,7 +310,7 @@ impl K2VRpcHandler {
// - we have a response to a read quorum of requests (e.g. 2/3), and an extra delay
// has passed since the quorum was achieved
// - a global RPC timeout expired
- // The extra delay after a quorum was received is usefull if the third response was to
+ // The extra delay after a quorum was received is useful if the third response was to
// arrive during this short interval: this would allow us to consider all the data seen
// by that last node in the response we produce, and would likely help reduce the
// size of the seen marker that we will return (because we would have an info of the
@@ -500,7 +500,7 @@ impl K2VRpcHandler {
} else {
// If no seen marker was specified, we do not poll for anything.
// We return immediately with the set of known items (even if
- // it is empty), which will give the client an inital view of
+ // it is empty), which will give the client an initial view of
// the dataset and an initial seen marker for further
// PollRange calls.
self.poll_range_read_range(range, &RangeSeenMarker::default())
diff --git a/src/model/s3/object_table.rs b/src/model/s3/object_table.rs
index 5c721148..6c33b79b 100644
--- a/src/model/s3/object_table.rs
+++ b/src/model/s3/object_table.rs
@@ -31,11 +31,11 @@ mod v08 {
/// The key at which the object is stored in its bucket, used as sorting key
pub key: String,
- /// The list of currenty stored versions of the object
+ /// The list of currently stored versions of the object
pub(super) versions: Vec<ObjectVersion>,
}
- /// Informations about a version of an object
+ /// Information about a version of an object
#[derive(PartialEq, Eq, Clone, Debug, Serialize, Deserialize)]
pub struct ObjectVersion {
/// Id of the version
@@ -109,11 +109,11 @@ mod v09 {
/// The key at which the object is stored in its bucket, used as sorting key
pub key: String,
- /// The list of currenty stored versions of the object
+ /// The list of currently stored versions of the object
pub(super) versions: Vec<ObjectVersion>,
}
- /// Informations about a version of an object
+ /// Information about a version of an object
#[derive(PartialEq, Eq, Clone, Debug, Serialize, Deserialize)]
pub struct ObjectVersion {
/// Id of the version
@@ -186,11 +186,11 @@ mod v010 {
/// The key at which the object is stored in its bucket, used as sorting key
pub key: String,
- /// The list of currenty stored versions of the object
+ /// The list of currently stored versions of the object
pub(super) versions: Vec<ObjectVersion>,
}
- /// Informations about a version of an object
+ /// Information about a version of an object
#[derive(PartialEq, Eq, Clone, Debug, Serialize, Deserialize)]
pub struct ObjectVersion {
/// Id of the version
diff --git a/src/model/s3/version_table.rs b/src/model/s3/version_table.rs
index d611a9e3..45be5af8 100644
--- a/src/model/s3/version_table.rs
+++ b/src/model/s3/version_table.rs
@@ -49,7 +49,7 @@ mod v08 {
pub offset: u64,
}
- /// Informations about a single block
+ /// Information about a single block
#[derive(PartialEq, Eq, Ord, PartialOrd, Clone, Copy, Debug, Serialize, Deserialize)]
pub struct VersionBlock {
/// Blake2 sum of the block
diff --git a/src/model/snapshot.rs b/src/model/snapshot.rs
index 36f9ec7d..87756f60 100644
--- a/src/model/snapshot.rs
+++ b/src/model/snapshot.rs
@@ -20,7 +20,7 @@ static SNAPSHOT_MUTEX: Mutex<()> = Mutex::new(());
// ================ snapshotting logic =====================
-/// Run snashot_metadata in a blocking thread and async await on it
+/// Run snapshot_metadata in a blocking thread and async await on it
pub async fn async_snapshot_metadata(garage: &Arc<Garage>) -> Result<(), Error> {
let garage = garage.clone();
let worker = tokio::task::spawn_blocking(move || snapshot_metadata(&garage));