aboutsummaryrefslogtreecommitdiff
path: root/src/table
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-02-23 22:45:36 +0100
committerAlex Auvolat <alex@adnab.me>2021-02-23 22:45:36 +0100
commita52ab696403ebb824618e0f18ef9f4e707648439 (patch)
treed9f77d59bb1b4c4f5d6b5ec3d11712e1424ff714 /src/table
parent20e6e9fa2035ac12946bf0dcd5b8049090955bde (diff)
downloadgarage-a52ab696403ebb824618e0f18ef9f4e707648439.tar.gz
garage-a52ab696403ebb824618e0f18ef9f4e707648439.zip
fix misuse of sled transactions
Diffstat (limited to 'src/table')
-rw-r--r--src/table/table.rs2
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);