@ -360,7 +360,6 @@ TEST_F(DBBasicTest, FLUSH) {
WriteOptions writeOpt = WriteOptions ( ) ;
WriteOptions writeOpt = WriteOptions ( ) ;
writeOpt . disableWAL = true ;
writeOpt . disableWAL = true ;
SetPerfLevel ( kEnableTime ) ;
SetPerfLevel ( kEnableTime ) ;
;
ASSERT_OK ( dbfull ( ) - > Put ( writeOpt , handles_ [ 1 ] , " foo " , " v1 " ) ) ;
ASSERT_OK ( dbfull ( ) - > Put ( writeOpt , handles_ [ 1 ] , " foo " , " v1 " ) ) ;
// this will now also flush the last 2 writes
// this will now also flush the last 2 writes
ASSERT_OK ( Flush ( 1 ) ) ;
ASSERT_OK ( Flush ( 1 ) ) ;
@ -369,6 +368,7 @@ TEST_F(DBBasicTest, FLUSH) {
get_perf_context ( ) - > Reset ( ) ;
get_perf_context ( ) - > Reset ( ) ;
Get ( 1 , " foo " ) ;
Get ( 1 , " foo " ) ;
ASSERT_TRUE ( ( int ) get_perf_context ( ) - > get_from_output_files_time > 0 ) ;
ASSERT_TRUE ( ( int ) get_perf_context ( ) - > get_from_output_files_time > 0 ) ;
ASSERT_EQ ( 2 , ( int ) get_perf_context ( ) - > get_read_bytes ) ;
ReopenWithColumnFamilies ( { " default " , " pikachu " } , CurrentOptions ( ) ) ;
ReopenWithColumnFamilies ( { " default " , " pikachu " } , CurrentOptions ( ) ) ;
ASSERT_EQ ( " v1 " , Get ( 1 , " foo " ) ) ;
ASSERT_EQ ( " v1 " , Get ( 1 , " foo " ) ) ;
@ -725,6 +725,7 @@ TEST_F(DBBasicTest, FlushOneColumnFamily) {
TEST_F ( DBBasicTest , MultiGetSimple ) {
TEST_F ( DBBasicTest , MultiGetSimple ) {
do {
do {
CreateAndReopenWithCF ( { " pikachu " } , CurrentOptions ( ) ) ;
CreateAndReopenWithCF ( { " pikachu " } , CurrentOptions ( ) ) ;
SetPerfLevel ( kEnableCount ) ;
ASSERT_OK ( Put ( 1 , " k1 " , " v1 " ) ) ;
ASSERT_OK ( Put ( 1 , " k1 " , " v1 " ) ) ;
ASSERT_OK ( Put ( 1 , " k2 " , " v2 " ) ) ;
ASSERT_OK ( Put ( 1 , " k2 " , " v2 " ) ) ;
ASSERT_OK ( Put ( 1 , " k3 " , " v3 " ) ) ;
ASSERT_OK ( Put ( 1 , " k3 " , " v3 " ) ) ;
@ -738,12 +739,15 @@ TEST_F(DBBasicTest, MultiGetSimple) {
std : : vector < std : : string > values ( 20 , " Temporary data to be overwritten " ) ;
std : : vector < std : : string > values ( 20 , " Temporary data to be overwritten " ) ;
std : : vector < ColumnFamilyHandle * > cfs ( keys . size ( ) , handles_ [ 1 ] ) ;
std : : vector < ColumnFamilyHandle * > cfs ( keys . size ( ) , handles_ [ 1 ] ) ;
get_perf_context ( ) - > Reset ( ) ;
std : : vector < Status > s = db_ - > MultiGet ( ReadOptions ( ) , cfs , keys , & values ) ;
std : : vector < Status > s = db_ - > MultiGet ( ReadOptions ( ) , cfs , keys , & values ) ;
ASSERT_EQ ( values . size ( ) , keys . size ( ) ) ;
ASSERT_EQ ( values . size ( ) , keys . size ( ) ) ;
ASSERT_EQ ( values [ 0 ] , " v1 " ) ;
ASSERT_EQ ( values [ 0 ] , " v1 " ) ;
ASSERT_EQ ( values [ 1 ] , " v2 " ) ;
ASSERT_EQ ( values [ 1 ] , " v2 " ) ;
ASSERT_EQ ( values [ 2 ] , " v3 " ) ;
ASSERT_EQ ( values [ 2 ] , " v3 " ) ;
ASSERT_EQ ( values [ 4 ] , " v5 " ) ;
ASSERT_EQ ( values [ 4 ] , " v5 " ) ;
// four kv pairs * two bytes per value
ASSERT_EQ ( 8 , ( int ) get_perf_context ( ) - > multiget_read_bytes ) ;
ASSERT_OK ( s [ 0 ] ) ;
ASSERT_OK ( s [ 0 ] ) ;
ASSERT_OK ( s [ 1 ] ) ;
ASSERT_OK ( s [ 1 ] ) ;
@ -751,6 +755,7 @@ TEST_F(DBBasicTest, MultiGetSimple) {
ASSERT_TRUE ( s [ 3 ] . IsNotFound ( ) ) ;
ASSERT_TRUE ( s [ 3 ] . IsNotFound ( ) ) ;
ASSERT_OK ( s [ 4 ] ) ;
ASSERT_OK ( s [ 4 ] ) ;
ASSERT_TRUE ( s [ 5 ] . IsNotFound ( ) ) ;
ASSERT_TRUE ( s [ 5 ] . IsNotFound ( ) ) ;
SetPerfLevel ( kDisable ) ;
} while ( ChangeCompactOptions ( ) ) ;
} while ( ChangeCompactOptions ( ) ) ;
}
}