aboutsummaryrefslogtreecommitdiff
path: root/src/model/index_counter.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/model/index_counter.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/model/index_counter.rs')
-rw-r--r--src/model/index_counter.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/model/index_counter.rs b/src/model/index_counter.rs
index 35d6596d..a46c165f 100644
--- a/src/model/index_counter.rs
+++ b/src/model/index_counter.rs
@@ -294,7 +294,7 @@ impl<T: CountedItem> IndexCounter<T> {
let counter_entry = local_counter.into_counter_entry(self.this_node);
self.local_counter
.db()
- .transaction(|mut tx| self.table.queue_insert(&mut tx, &counter_entry))?;
+ .transaction(|tx| self.table.queue_insert(tx, &counter_entry))?;
next_start = Some(local_counter_k);
}
@@ -360,7 +360,7 @@ impl<T: CountedItem> IndexCounter<T> {
let counter_entry = local_counter.into_counter_entry(self.this_node);
self.local_counter
.db()
- .transaction(|mut tx| self.table.queue_insert(&mut tx, &counter_entry))?;
+ .transaction(|tx| self.table.queue_insert(tx, &counter_entry))?;
next_start = Some(counted_entry_k);
}