diff options
author | Alex <alex@adnab.me> | 2023-01-03 15:28:24 +0000 |
---|---|---|
committer | Alex <alex@adnab.me> | 2023-01-03 15:28:24 +0000 |
commit | 73ed9c74039448c69ebe382e361acf3ecbfef70b (patch) | |
tree | 7fb21a559e53557d5dea5efd2b7dafe9f9751367 /src/model/migrate.rs | |
parent | 582b0761790b7958a3ba10c4b549b466997d2dcd (diff) | |
parent | 1d5bdc17a46648eb3494ff629d0d360d0217c1e2 (diff) | |
download | garage-73ed9c74039448c69ebe382e361acf3ecbfef70b.tar.gz garage-73ed9c74039448c69ebe382e361acf3ecbfef70b.zip |
Merge pull request 'Refactor how things are migrated' (#461) from format-migration into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/461
Diffstat (limited to 'src/model/migrate.rs')
-rw-r--r-- | src/model/migrate.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/model/migrate.rs b/src/model/migrate.rs index cd6ad26a..6b4c3eed 100644 --- a/src/model/migrate.rs +++ b/src/model/migrate.rs @@ -2,6 +2,7 @@ use std::sync::Arc; use garage_util::crdt::*; use garage_util::data::*; +use garage_util::encode::nonversioned_decode; use garage_util::error::Error as GarageError; use garage_util::time::*; @@ -28,8 +29,8 @@ impl Migrate { let mut old_buckets = vec![]; for res in tree.iter().map_err(GarageError::from)? { let (_k, v) = res.map_err(GarageError::from)?; - let bucket = rmp_serde::decode::from_read_ref::<_, old_bucket::Bucket>(&v[..]) - .map_err(GarageError::from)?; + let bucket = + nonversioned_decode::<old_bucket::Bucket>(&v[..]).map_err(GarageError::from)?; old_buckets.push(bucket); } |