Skip to content

Commit

Permalink
remove debug counter
Browse files Browse the repository at this point in the history
  • Loading branch information
MarinPostma committed Oct 10, 2024
1 parent 7bd8527 commit 60f1736
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions libsql-wal/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,8 @@ pub struct Savepoint {
pub index: BTreeMap<u32, u32>,
}

pub static SAVEPOINT_COUNTER: AtomicU64 = AtomicU64::new(0);

impl Savepoint {
pub fn new(next_offset: u32, next_frame_no: u64, current_checksum: u32) -> Self {
SAVEPOINT_COUNTER.fetch_add(1, std::sync::atomic::Ordering::SeqCst);
Self {
next_offset,
next_frame_no,
Expand All @@ -146,12 +143,6 @@ impl Savepoint {
}
}

impl Drop for Savepoint {
fn drop(&mut self) {
SAVEPOINT_COUNTER.fetch_sub(1, std::sync::atomic::Ordering::SeqCst);
}
}

/// The savepoints must be passed from most recent to oldest
pub(crate) fn merge_savepoints<'a>(
savepoints: impl Iterator<Item = &'a BTreeMap<u32, u32>>,
Expand Down

0 comments on commit 60f1736

Please sign in to comment.