diff options
author | Alex Auvolat <alex@adnab.me> | 2021-02-23 22:45:36 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-02-23 22:45:36 +0100 |
commit | a52ab696403ebb824618e0f18ef9f4e707648439 (patch) | |
tree | d9f77d59bb1b4c4f5d6b5ec3d11712e1424ff714 | |
parent | 20e6e9fa2035ac12946bf0dcd5b8049090955bde (diff) | |
download | garage-a52ab696403ebb824618e0f18ef9f4e707648439.tar.gz garage-a52ab696403ebb824618e0f18ef9f4e707648439.zip |
fix misuse of sled transactions
-rw-r--r-- | src/table/table.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/table/table.rs b/src/table/table.rs index 8389c29f..bcf407ec 100644 --- a/src/table/table.rs +++ b/src/table/table.rs @@ -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); |