aboutsummaryrefslogtreecommitdiff
path: root/src/garage
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-01-03 15:27:36 +0100
committerAlex Auvolat <alex@adnab.me>2023-01-03 15:27:36 +0100
commit8d5505514f950dc1ca1249a3385c9913b5b5e8e0 (patch)
treea74c043fe76deab6cb0919c6f002f0a4e87be19d /src/garage
parent426d8784dac0e39879af52d980887d3692fc907c (diff)
downloadgarage-8d5505514f950dc1ca1249a3385c9913b5b5e8e0.tar.gz
garage-8d5505514f950dc1ca1249a3385c9913b5b5e8e0.zip
Make it explicit when using nonversioned encoding
Diffstat (limited to 'src/garage')
-rw-r--r--src/garage/Cargo.toml1
-rw-r--r--src/garage/repair/online.rs5
2 files changed, 3 insertions, 3 deletions
diff --git a/src/garage/Cargo.toml b/src/garage/Cargo.toml
index 337699ca..b43b0242 100644
--- a/src/garage/Cargo.toml
+++ b/src/garage/Cargo.toml
@@ -42,7 +42,6 @@ rand = "0.8"
async-trait = "0.1.7"
sodiumoxide = { version = "0.2.5-0", package = "kuska-sodiumoxide" }
-rmp-serde = "0.15"
serde = { version = "1.0", default-features = false, features = ["derive", "rc"] }
serde_bytes = "0.11"
structopt = { version = "0.3", default-features = false }
diff --git a/src/garage/repair/online.rs b/src/garage/repair/online.rs
index 7120972c..627e3bf3 100644
--- a/src/garage/repair/online.rs
+++ b/src/garage/repair/online.rs
@@ -12,6 +12,7 @@ use garage_model::s3::version_table::*;
use garage_table::*;
use garage_util::background::*;
use garage_util::error::Error;
+use garage_util::migrate::Migrate;
use crate::*;
@@ -100,7 +101,7 @@ impl Worker for RepairVersionsWorker {
}
};
- let version = rmp_serde::decode::from_read_ref::<_, Version>(&item_bytes)?;
+ let version = Version::decode(&item_bytes).ok_or_message("Cannot decode Version")?;
if !version.deleted.get() {
let object = self
.garage
@@ -180,7 +181,7 @@ impl Worker for RepairBlockrefsWorker {
}
};
- let block_ref = rmp_serde::decode::from_read_ref::<_, BlockRef>(&item_bytes)?;
+ let block_ref = BlockRef::decode(&item_bytes).ok_or_message("Cannot decode BlockRef")?;
if !block_ref.deleted.get() {
let version = self
.garage