Some improvements to Garage internals #451

Merged
lx merged 14 commits from internals-rework into main 2023-01-03 11:37:32 +00:00
Showing only changes of commit 13c8662126 - Show all commits

View file

@ -330,13 +330,12 @@ where
let mut entry = self.decode_entry(&old_v).map_err(db::TxError::Abort)?; let mut entry = self.decode_entry(&old_v).map_err(db::TxError::Abort)?;
entry.merge(ins); entry.merge(ins);
rmp_to_vec_all_named(&entry) rmp_to_vec_all_named(&entry)
.map_err(Error::RmpEncode)
.map_err(db::TxError::Abort)?
} }
None => rmp_to_vec_all_named(ins) None => rmp_to_vec_all_named(ins),
.map_err(Error::RmpEncode)
.map_err(db::TxError::Abort)?,
}; };
let new_entry = new_entry
.map_err(Error::RmpEncode)
.map_err(db::TxError::Abort)?;
tx.insert(&self.insert_queue, &tree_key, new_entry)?; tx.insert(&self.insert_queue, &tree_key, new_entry)?;
self.insert_queue_notify.notify_one(); self.insert_queue_notify.notify_one();