diff --git a/crates/node/primitives/src/delta_buffer.rs b/crates/node/primitives/src/delta_buffer.rs index 171c583a9..68987ad91 100644 --- a/crates/node/primitives/src/delta_buffer.rs +++ b/crates/node/primitives/src/delta_buffer.rs @@ -92,8 +92,10 @@ impl DeltaBuffer { pub fn push(&mut self, delta: BufferedDelta) -> bool { if self.deltas.len() >= self.capacity { // Evict oldest delta (front of queue) - let _evicted = self.deltas.pop_front(); - self.drops += 1; + // Only increment drops if we actually evicted something + if self.deltas.pop_front().is_some() { + self.drops += 1; + } self.deltas.push_back(delta); false } else { diff --git a/crates/node/tests/sync_sim/sim_runtime.rs b/crates/node/tests/sync_sim/sim_runtime.rs index e9bb9136d..76b108e05 100644 --- a/crates/node/tests/sync_sim/sim_runtime.rs +++ b/crates/node/tests/sync_sim/sim_runtime.rs @@ -622,6 +622,7 @@ impl SimRuntime { for (_delta_id, operations) in buffered_ops { for op in operations { n.apply_storage_op(op); + self.metrics.work.record_write(); } }