cork database during global counter increment
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
e125af620e
commit
08274150e5
1 changed files with 1 additions and 0 deletions
|
@ -57,6 +57,7 @@ impl Data {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn next_count(&self) -> Result<u64> {
|
pub fn next_count(&self) -> Result<u64> {
|
||||||
|
let _cork = self.db.cork();
|
||||||
let mut lock = self.counter.write().expect("locked");
|
let mut lock = self.counter.write().expect("locked");
|
||||||
let counter: &mut u64 = &mut lock;
|
let counter: &mut u64 = &mut lock;
|
||||||
debug_assert!(
|
debug_assert!(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue