mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-30 08:49:29 +00:00
garage_db: refactor transactions and add on_commit mechanism
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user