Skip to content

Commit

Permalink
storage: lower mvcc::ScanIterator::BUFFER_SIZE in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgrinaker committed Jul 19, 2024
1 parent 462a82c commit c2f00bf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/storage/mvcc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,11 @@ type UserValue = Vec<u8>;

impl<E: Engine> ScanIterator<E> {
/// The number of live keys to pull from the engine at a time.
/// TODO: add tests that either exceed or vary this.
const BUFFER_SIZE: usize = 100;
#[cfg(not(test))]
const BUFFER_SIZE: usize = 1000;
/// Pull only 2 keys in tests, to exercise this more often.
#[cfg(test)]
const BUFFER_SIZE: usize = 2;

/// Creates a new scan iterator.
fn new(
Expand Down

0 comments on commit c2f00bf

Please sign in to comment.