cork database during global counter increment

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk committed 2024-07-04 21:06:35 +00:00
1 parent e125af620e
commit 08274150e5
1 file changed
+1
+1
View File
@@ -57,6 +57,7 @@ impl Data {
}
pub fn next_count(&self) -> Result<u64> {
let _cork = self.db.cork();
let mut lock = self.counter.write().expect("locked");
let counter: &mut u64 = &mut lock;
debug_assert!(