aboutsummaryrefslogtreecommitdiff
path: root/src/table/merkle.rs
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2023-09-21 14:03:35 +0000
committerAlex <alex@adnab.me>2023-09-21 14:03:35 +0000
commit1d986bd889a5f5fe1bdc75e7d4b34acc2cfbe09f (patch)
tree5b5f8d66637c4a10866b00e07a45081c93cf75cf /src/table/merkle.rs
parentfd7d8fec59c617b40e480ff855894cf35fdcfb40 (diff)
parent0635250b2bdcce4156704128de154f9052d34e9e (diff)
downloadgarage-1d986bd889a5f5fe1bdc75e7d4b34acc2cfbe09f.tar.gz
garage-1d986bd889a5f5fe1bdc75e7d4b34acc2cfbe09f.zip
Merge pull request 'Refactor db transactions and add on_commit for table.queue_insert' (#637) from k2v-indices-lmdb into next
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/637
Diffstat (limited to 'src/table/merkle.rs')
-rw-r--r--src/table/merkle.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/table/merkle.rs b/src/table/merkle.rs
index e86d0251..4577f872 100644
--- a/src/table/merkle.rs
+++ b/src/table/merkle.rs
@@ -108,9 +108,9 @@ impl<F: TableSchema, R: TableReplication> MerkleUpdater<F, R> {
self.data
.merkle_tree
.db()
- .transaction(|mut tx| self.update_item_rec(&mut tx, k, &khash, &key, new_vhash))?;
+ .transaction(|tx| self.update_item_rec(tx, k, &khash, &key, new_vhash))?;
- let deleted = self.data.merkle_todo.db().transaction(|mut tx| {
+ let deleted = self.data.merkle_todo.db().transaction(|tx| {
let remove = matches!(tx.get(&self.data.merkle_todo, k)?, Some(ov) if ov == vhash_by);
if remove {
tx.remove(&self.data.merkle_todo, k)?;