Post review fixes

This commit is contained in:
Arthur Carcano
2026-04-28 17:56:03 +02:00
committed by Alex
parent 6a097e7de3
commit 322da7242b
6 changed files with 6 additions and 14 deletions
Generated
+1 -1
View File
@@ -1133,7 +1133,7 @@ checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.114",
"syn 2.0.117",
]
[[package]]
+2 -1
View File
@@ -41,7 +41,7 @@ k2v-client = { version = "0.0.4", path = "src/k2v-client" }
# External crates from crates.io
arc-swap = "1.8"
arbitrary = { version = "1.4.2", features = ["derive"] }
arbitrary = { version = "1.4.2"}
argon2 = "0.5"
async-trait = "0.1"
backtrace = "0.3"
@@ -61,6 +61,7 @@ hmac = "0.12"
itertools = "0.14"
ipnet = "2.11"
lazy_static = "1.5"
libfuzzer-sys = "0.4"
md-5 = "0.10"
mktemp = "0.5"
nix = { version = "0.31", default-features = false, features = ["fs"] }
+2 -2
View File
@@ -8,8 +8,8 @@ edition = "2018"
cargo-fuzz = true
[dependencies]
arbitrary = { version = "1.4.2", features = ["derive"] }
libfuzzer-sys = "0.4"
arbitrary = { workspace = true, features = ["derive"]}
libfuzzer-sys = { workspace = true }
[dependencies.garage_table]
path = "../src/table"
+1 -4
View File
@@ -6,13 +6,10 @@ use libfuzzer_sys::fuzz_target;
/// 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.
/// Duplicate part keys are dropped before construction.
/// `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.
/// If deleted, parts are cleared to ensure a valid initial CRDT state.
fn make_mpu(deleted: bool, mut parts: Vec<(MpuPartKey, MpuPart)>) -> MultipartUpload {
parts.sort_by_key(|(k, _)| *k);
parts.dedup_by_key(|(k, _)| *k);
fn make_mpu(deleted: bool, parts: Vec<(MpuPartKey, MpuPart)>) -> MultipartUpload {
let mut mpu = MultipartUpload::new(
[0u8; 32].into(),
0,
-1
View File
@@ -93,7 +93,6 @@ pub(crate) mod v09 {
}
#[derive(PartialEq, Eq, Clone, Debug, Serialize, Deserialize)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
pub enum VersionBacklink {
Object {
/// Bucket in which the related object is stored
-5
View File
@@ -84,11 +84,6 @@ where
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
pub fn timestamp(&self) -> u64 {
self.ts