@ -952,10 +952,10 @@ class StressTest {
prefixes [ i ] . resize ( FLAGS_prefix_size ) ;
prefix_slices [ i ] = Slice ( prefixes [ i ] ) ;
readoptionscopy [ i ] = readoptions ;
readoptionscopy [ i ] . prefix = & prefix_slices [ i ] ;
readoptionscopy [ i ] . prefix_seek = true ;
readoptionscopy [ i ] . snapshot = snapshot ;
iters [ i ] = db_ - > NewIterator ( readoptionscopy [ i ] ) ;
iters [ i ] - > SeekToFirst ( ) ;
iters [ i ] - > Seek ( prefix_slices [ i ] ) ;
}
int count = 0 ;
@ -1103,11 +1103,11 @@ class StressTest {
// prefix
if ( ! FLAGS_test_batches_snapshots ) {
Slice prefix = Slice ( key . data ( ) , FLAGS_prefix_size ) ;
read_opts . prefix = & prefix ;
read_opts . prefix_seek = true ;
Iterator * iter = db_ - > NewIterator ( read_opts ) ;
int64_t count = 0 ;
for ( iter - > SeekToFirst ( ) ; iter - > Valid ( ) ; iter - > Next ( ) ) {
assert ( iter - > key ( ) . starts_with ( prefix ) ) ;
for ( iter - > Seek ( prefix ) ;
iter - > Valid ( ) & & iter - > key ( ) . starts_with ( prefix ) ; iter - > Next ( ) ) {
+ + count ;
}
assert ( count < =
@ -1121,7 +1121,6 @@ class StressTest {
} else {
MultiPrefixScan ( thread , read_opts , key ) ;
}
read_opts . prefix = nullptr ;
} else if ( prefixBound < = prob_op & & prob_op < writeBound ) {
// OPERATION write
uint32_t value_base = thread - > rand . Next ( ) ;