Skip to content

Commit

Permalink
Merge pull request #2506 from ljedrz/perf/lock_tweaks
Browse files Browse the repository at this point in the history
[Perf] Speed up locking in DataMap::atomic_checkpoint
  • Loading branch information
vicsn authored Feb 17, 2025
2 parents 95c0508 + 78229cd commit 8cbf2b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ledger/store/src/helpers/rocksdb/internal/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ impl<
///
fn atomic_checkpoint(&self) {
// Push the current length of the atomic batch to the checkpoint stack.
self.checkpoints.lock().push(self.atomic_batch.lock().len());
let batch_len = self.atomic_batch.lock().len();
self.checkpoints.lock().push(batch_len);
}

///
Expand Down

0 comments on commit 8cbf2b2

Please sign in to comment.