mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-07-26 07:58:14 +00:00
Post review fixes
This commit is contained in:
Generated
+1
-1
@@ -1133,7 +1133,7 @@ checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.114",
|
"syn 2.0.117",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|||||||
+2
-1
@@ -41,7 +41,7 @@ k2v-client = { version = "0.0.4", path = "src/k2v-client" }
|
|||||||
|
|
||||||
# External crates from crates.io
|
# External crates from crates.io
|
||||||
arc-swap = "1.8"
|
arc-swap = "1.8"
|
||||||
arbitrary = { version = "1.4.2", features = ["derive"] }
|
arbitrary = { version = "1.4.2"}
|
||||||
argon2 = "0.5"
|
argon2 = "0.5"
|
||||||
async-trait = "0.1"
|
async-trait = "0.1"
|
||||||
backtrace = "0.3"
|
backtrace = "0.3"
|
||||||
@@ -61,6 +61,7 @@ hmac = "0.12"
|
|||||||
itertools = "0.14"
|
itertools = "0.14"
|
||||||
ipnet = "2.11"
|
ipnet = "2.11"
|
||||||
lazy_static = "1.5"
|
lazy_static = "1.5"
|
||||||
|
libfuzzer-sys = "0.4"
|
||||||
md-5 = "0.10"
|
md-5 = "0.10"
|
||||||
mktemp = "0.5"
|
mktemp = "0.5"
|
||||||
nix = { version = "0.31", default-features = false, features = ["fs"] }
|
nix = { version = "0.31", default-features = false, features = ["fs"] }
|
||||||
|
|||||||
+2
-2
@@ -8,8 +8,8 @@ edition = "2018"
|
|||||||
cargo-fuzz = true
|
cargo-fuzz = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
arbitrary = { version = "1.4.2", features = ["derive"] }
|
arbitrary = { workspace = true, features = ["derive"]}
|
||||||
libfuzzer-sys = "0.4"
|
libfuzzer-sys = { workspace = true }
|
||||||
|
|
||||||
[dependencies.garage_table]
|
[dependencies.garage_table]
|
||||||
path = "../src/table"
|
path = "../src/table"
|
||||||
|
|||||||
@@ -6,13 +6,10 @@ use libfuzzer_sys::fuzz_target;
|
|||||||
|
|
||||||
/// Build a MultipartUpload from an arbitrary deleted flag and parts list, using a fixed
|
/// Build a MultipartUpload from an arbitrary deleted flag and parts list, using a fixed
|
||||||
/// upload_id/bucket_id/key so that CRDT state can be compared across merge results.
|
/// upload_id/bucket_id/key so that CRDT state can be compared across merge results.
|
||||||
/// Duplicate part keys are dropped before construction.
|
|
||||||
/// `MpuPart.version` is fixed to a constant since it is identity data, not CRDT state:
|
/// `MpuPart.version` is fixed to a constant since it is identity data, not CRDT state:
|
||||||
/// two replicas of the same part (same MpuPartKey) always share the same version UUID.
|
/// two replicas of the same part (same MpuPartKey) always share the same version UUID.
|
||||||
/// If deleted, parts are cleared to ensure a valid initial CRDT state.
|
/// If deleted, parts are cleared to ensure a valid initial CRDT state.
|
||||||
fn make_mpu(deleted: bool, mut parts: Vec<(MpuPartKey, MpuPart)>) -> MultipartUpload {
|
fn make_mpu(deleted: bool, parts: Vec<(MpuPartKey, MpuPart)>) -> MultipartUpload {
|
||||||
parts.sort_by_key(|(k, _)| *k);
|
|
||||||
parts.dedup_by_key(|(k, _)| *k);
|
|
||||||
let mut mpu = MultipartUpload::new(
|
let mut mpu = MultipartUpload::new(
|
||||||
[0u8; 32].into(),
|
[0u8; 32].into(),
|
||||||
0,
|
0,
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ pub(crate) mod v09 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Eq, Clone, Debug, Serialize, Deserialize)]
|
#[derive(PartialEq, Eq, Clone, Debug, Serialize, Deserialize)]
|
||||||
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
|
|
||||||
pub enum VersionBacklink {
|
pub enum VersionBacklink {
|
||||||
Object {
|
Object {
|
||||||
/// Bucket in which the related object is stored
|
/// Bucket in which the related object is stored
|
||||||
|
|||||||
@@ -84,11 +84,6 @@ where
|
|||||||
self.v = new_value;
|
self.v = new_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn update2(&mut self, f: impl FnOnce(&mut T), time: u64) {
|
|
||||||
self.ts = std::cmp::max(self.ts + 1, time);
|
|
||||||
f(&mut self.v)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get the timestamp currently associated with the value
|
/// Get the timestamp currently associated with the value
|
||||||
pub fn timestamp(&self) -> u64 {
|
pub fn timestamp(&self) -> u64 {
|
||||||
self.ts
|
self.ts
|
||||||
|
|||||||
Reference in New Issue
Block a user