mirror of
https://git.deuxfleurs.fr/Deuxfleurs/garage.git
synced 2024-11-21 23:51:00 +00:00
fix misuse of sled transactions
This commit is contained in:
parent
20e6e9fa20
commit
a52ab69640
1 changed files with 1 additions and 1 deletions
|
@ -431,7 +431,7 @@ where
|
|||
|
||||
pub(crate) fn delete_if_equal(self: &Arc<Self>, k: &[u8], v: &[u8]) -> Result<bool, Error> {
|
||||
let removed = self.store.transaction(|txn| {
|
||||
if let Some(cur_v) = self.store.get(k)? {
|
||||
if let Some(cur_v) = txn.get(k)? {
|
||||
if cur_v == v {
|
||||
txn.remove(v)?;
|
||||
return Ok(true);
|
||||
|
|
Loading…
Reference in a new issue