diff --git a/src/tree_store/page_store/cached_file.rs b/src/tree_store/page_store/cached_file.rs index 67802a40..c98a31f9 100644 --- a/src/tree_store/page_store/cached_file.rs +++ b/src/tree_store/page_store/cached_file.rs @@ -303,6 +303,7 @@ impl PagedCachedFile { } else { self.read_cache_bytes .fetch_sub(buffer.len(), Ordering::AcqRel); + break; } } for (offset, buffer) in write_buffer.low_pri_cache.iter_mut() { @@ -318,6 +319,7 @@ impl PagedCachedFile { } else { self.read_cache_bytes .fetch_sub(buffer.len(), Ordering::AcqRel); + break; } } self.write_buffer_bytes.store(0, Ordering::Release);