From b3ff62c221770db77ea9e222f95a14a1a07b4d64 Mon Sep 17 00:00:00 2001 From: Johanna Larsson Date: Sat, 12 Sep 2026 15:57:45 +0100 Subject: [PATCH] Simplify blob migration --- crates/tranquil-store/src/metastore/mod.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/crates/tranquil-store/src/metastore/mod.rs b/crates/tranquil-store/src/metastore/mod.rs index 7b1730e..4f22bfb 100644 --- a/crates/tranquil-store/src/metastore/mod.rs +++ b/crates/tranquil-store/src/metastore/mod.rs @@ -277,16 +277,7 @@ impl Metastore { }; let cid_index_key = blobs::blob_by_cid_key(cid_str.as_str()); - let content = match repo_data - .get(cid_index_key.as_slice())? - .and_then(|raw| blobs::BlobContentValue::deserialize(raw.as_ref())) - { - Some(mut existing) => { - existing.ref_count = existing.ref_count.saturating_add(1); - existing - } - None => blobs::BlobContentValue { meta, ref_count: 1 }, - }; + let content = blobs::BlobContentValue { meta, ref_count: 1 }; let mut batch = db.batch(); batch.insert(repo_data, cid_index_key.as_slice(), content.serialize());