@ -183,19 +183,32 @@ TEST_P(DBTestSharedWriteBufferAcrossCFs, SharedWriteBufferAcrossCFs) {
options . write_buffer_size = 500000 ; // this is never hit
options . write_buffer_size = 500000 ; // this is never hit
CreateAndReopenWithCF ( { " pikachu " , " dobrynia " , " nikitich " } , options ) ;
CreateAndReopenWithCF ( { " pikachu " , " dobrynia " , " nikitich " } , options ) ;
// Trigger a flush on CF "nikitich"
WriteOptions wo ;
ASSERT_OK ( Put ( 0 , Key ( 1 ) , DummyString ( 1 ) ) ) ;
wo . disableWAL = true ;
ASSERT_OK ( Put ( 1 , Key ( 1 ) , DummyString ( 1 ) ) ) ;
ASSERT_OK ( Put ( 3 , Key ( 1 ) , DummyString ( 90000 ) ) ) ;
// Create some data and flush "default" and "nikitich" so that they
ASSERT_OK ( Put ( 2 , Key ( 2 ) , DummyString ( 20000 ) ) ) ;
// are newer CFs created.
ASSERT_OK ( Put ( 2 , Key ( 1 ) , DummyString ( 1 ) ) ) ;
ASSERT_OK ( Put ( 3 , Key ( 1 ) , DummyString ( 1 ) , wo ) ) ;
Flush ( 3 ) ;
ASSERT_OK ( Put ( 3 , Key ( 1 ) , DummyString ( 1 ) , wo ) ) ;
ASSERT_OK ( Put ( 0 , Key ( 1 ) , DummyString ( 1 ) , wo ) ) ;
Flush ( 0 ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " default " ) ,
static_cast < uint64_t > ( 1 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " nikitich " ) ,
static_cast < uint64_t > ( 1 ) ) ;
ASSERT_OK ( Put ( 3 , Key ( 1 ) , DummyString ( 30000 ) , wo ) ) ;
ASSERT_OK ( Put ( 0 , Key ( 1 ) , DummyString ( 60000 ) , wo ) ) ;
ASSERT_OK ( Put ( 2 , Key ( 1 ) , DummyString ( 1 ) , wo ) ) ;
// No flush should trigger
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 0 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 0 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 1 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 1 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 2 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 2 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 3 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 3 ] ) ;
{
{
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " default " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " default " ) ,
static_cast < uint64_t > ( 0 ) ) ;
static_cast < uint64_t > ( 1 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " pikachu " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " pikachu " ) ,
static_cast < uint64_t > ( 0 ) ) ;
static_cast < uint64_t > ( 0 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " dobrynia " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " dobrynia " ) ,
@ -204,99 +217,85 @@ TEST_P(DBTestSharedWriteBufferAcrossCFs, SharedWriteBufferAcrossCFs) {
static_cast < uint64_t > ( 1 ) ) ;
static_cast < uint64_t > ( 1 ) ) ;
}
}
// "dobrynia": 20KB
// Trigger a flush. Flushing "nikitich".
// Flush 'dobrynia'
ASSERT_OK ( Put ( 3 , Key ( 2 ) , DummyString ( 30000 ) , wo ) ) ;
ASSERT_OK ( Put ( 3 , Key ( 2 ) , DummyString ( 40000 ) ) ) ;
ASSERT_OK ( Put ( 0 , Key ( 1 ) , DummyString ( 1 ) , wo ) ) ;
ASSERT_OK ( Put ( 2 , Key ( 2 ) , DummyString ( 70000 ) ) ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 0 ] ) ;
ASSERT_OK ( Put ( 0 , Key ( 1 ) , DummyString ( 1 ) ) ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 1 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 1 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 2 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 2 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 3 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 3 ] ) ;
{
{
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " default " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " default " ) ,
static_cast < uint64_t > ( 0 ) ) ;
static_cast < uint64_t > ( 1 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " pikachu " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " pikachu " ) ,
static_cast < uint64_t > ( 0 ) ) ;
static_cast < uint64_t > ( 0 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " dobrynia " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " dobrynia " ) ,
static_cast < uint64_t > ( 1 ) ) ;
static_cast < uint64_t > ( 0 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " nikitich " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " nikitich " ) ,
static_cast < uint64_t > ( 1 ) ) ;
static_cast < uint64_t > ( 2 ) ) ;
}
}
// "nikitich" still has data of 80KB
// Without hitting the threshold, no flush should trigger.
// Inserting Data in "dobrynia" triggers "nikitich" flushing.
ASSERT_OK ( Put ( 2 , Key ( 1 ) , DummyString ( 30000 ) , wo ) ) ;
ASSERT_OK ( Put ( 3 , Key ( 2 ) , DummyString ( 40000 ) ) ) ;
ASSERT_OK ( Put ( 2 , Key ( 1 ) , DummyString ( 1 ) , wo ) ) ;
ASSERT_OK ( Put ( 2 , Key ( 2 ) , DummyString ( 40000 ) ) ) ;
ASSERT_OK ( Put ( 2 , Key ( 1 ) , DummyString ( 1 ) , wo ) ) ;
ASSERT_OK ( Put ( 0 , Key ( 1 ) , DummyString ( 1 ) ) ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 0 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 1 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 1 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 2 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 2 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 3 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 3 ] ) ;
{
{
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " default " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " default " ) ,
static_cast < uint64_t > ( 0 ) ) ;
static_cast < uint64_t > ( 1 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " pikachu " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " pikachu " ) ,
static_cast < uint64_t > ( 0 ) ) ;
static_cast < uint64_t > ( 0 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " dobrynia " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " dobrynia " ) ,
static_cast < uint64_t > ( 1 ) ) ;
static_cast < uint64_t > ( 0 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " nikitich " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " nikitich " ) ,
static_cast < uint64_t > ( 2 ) ) ;
static_cast < uint64_t > ( 2 ) ) ;
}
}
// "dobrynia" still has 40KB
// Hit the write buffer limit again. "default"
ASSERT_OK ( Put ( 1 , Key ( 2 ) , DummyString ( 20000 ) ) ) ;
// will have been flushed.
ASSERT_OK ( Put ( 0 , Key ( 1 ) , DummyString ( 10000 ) ) ) ;
ASSERT_OK ( Put ( 2 , Key ( 2 ) , DummyString ( 10000 ) , wo ) ) ;
ASSERT_OK ( Put ( 0 , Key ( 1 ) , DummyString ( 1 ) ) ) ;
ASSERT_OK ( Put ( 3 , Key ( 1 ) , DummyString ( 1 ) , wo ) ) ;
ASSERT_OK ( Put ( 0 , Key ( 1 ) , DummyString ( 1 ) , wo ) ) ;
ASSERT_OK ( Put ( 0 , Key ( 1 ) , DummyString ( 1 ) , wo ) ) ;
ASSERT_OK ( Put ( 0 , Key ( 1 ) , DummyString ( 1 ) , wo ) ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 0 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 0 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 1 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 1 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 2 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 2 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 3 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 3 ] ) ;
// This should triggers no flush
{
{
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " default " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " default " ) ,
static_cast < uint64_t > ( 0 ) ) ;
static_cast < uint64_t > ( 2 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " pikachu " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " pikachu " ) ,
static_cast < uint64_t > ( 0 ) ) ;
static_cast < uint64_t > ( 0 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " dobrynia " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " dobrynia " ) ,
static_cast < uint64_t > ( 1 ) ) ;
static_cast < uint64_t > ( 0 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " nikitich " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " nikitich " ) ,
static_cast < uint64_t > ( 2 ) ) ;
static_cast < uint64_t > ( 2 ) ) ;
}
}
// "default": 10KB, "pikachu": 20KB, "dobrynia": 40KB
// Trigger another flush. This time "dobrynia". "pikachu" should not
ASSERT_OK ( Put ( 1 , Key ( 2 ) , DummyString ( 40000 ) ) ) ;
// be flushed, althrough it was never flushed.
ASSERT_OK ( Put ( 0 , Key ( 1 ) , DummyString ( 1 ) ) ) ;
ASSERT_OK ( Put ( 1 , Key ( 1 ) , DummyString ( 1 ) , wo ) ) ;
ASSERT_OK ( Put ( 2 , Key ( 1 ) , DummyString ( 80000 ) , wo ) ) ;
ASSERT_OK ( Put ( 1 , Key ( 1 ) , DummyString ( 1 ) , wo ) ) ;
ASSERT_OK ( Put ( 2 , Key ( 1 ) , DummyString ( 1 ) , wo ) ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 0 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 0 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 1 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 1 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 2 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 2 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 3 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 3 ] ) ;
// This should triggers flush of "pikachu"
{
{
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " default " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " default " ) ,
static_cast < uint64_t > ( 0 ) ) ;
static_cast < uint64_t > ( 2 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " pikachu " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " pikachu " ) ,
static_cast < uint64_t > ( 1 ) ) ;
static_cast < uint64_t > ( 0 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " dobrynia " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " dobrynia " ) ,
static_cast < uint64_t > ( 1 ) ) ;
static_cast < uint64_t > ( 1 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " nikitich " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " nikitich " ) ,
static_cast < uint64_t > ( 2 ) ) ;
static_cast < uint64_t > ( 2 ) ) ;
}
}
// "default": 10KB, "dobrynia": 40KB
// Some remaining writes so 'default', 'dobrynia' and 'nikitich' flush on
// closure.
ASSERT_OK ( Put ( 3 , Key ( 1 ) , DummyString ( 1 ) ) ) ;
ReopenWithColumnFamilies ( { " default " , " pikachu " , " dobrynia " , " nikitich " } ,
options ) ;
{
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " default " ) ,
static_cast < uint64_t > ( 1 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " pikachu " ) ,
static_cast < uint64_t > ( 1 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " dobrynia " ) ,
static_cast < uint64_t > ( 2 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " nikitich " ) ,
static_cast < uint64_t > ( 3 ) ) ;
}
}
}
INSTANTIATE_TEST_CASE_P ( DBTestSharedWriteBufferAcrossCFs ,
INSTANTIATE_TEST_CASE_P ( DBTestSharedWriteBufferAcrossCFs ,
@ -314,66 +313,60 @@ TEST_F(DBTest2, SharedWriteBufferLimitAcrossDB) {
ASSERT_OK ( DB : : Open ( options , dbname2 , & db2 ) ) ;
ASSERT_OK ( DB : : Open ( options , dbname2 , & db2 ) ) ;
WriteOptions wo ;
WriteOptions wo ;
wo . disableWAL = true ;
// Trigger a flush on cf2
// Trigger a flush on cf2
ASSERT_OK ( Put ( 0 , Key ( 1 ) , DummyString ( 1 ) ) ) ;
ASSERT_OK ( Put ( 2 , Key ( 1 ) , DummyString ( 70000 ) , wo ) ) ;
ASSERT_OK ( Put ( 1 , Key ( 1 ) , DummyString ( 1 ) ) ) ;
ASSERT_OK ( Put ( 0 , Key ( 1 ) , DummyString ( 20000 ) , wo ) ) ;
ASSERT_OK ( Put ( 2 , Key ( 1 ) , DummyString ( 90000 ) ) ) ;
// Insert to DB2
// Insert to DB2
ASSERT_OK ( db2 - > Put ( wo , Key ( 2 ) , DummyString ( 20000 ) ) ) ;
ASSERT_OK ( db2 - > Put ( wo , Key ( 2 ) , DummyString ( 20000 ) ) ) ;
ASSERT_OK ( Put ( 2 , Key ( 1 ) , DummyString ( 1 ) ) ) ;
ASSERT_OK ( Put ( 2 , Key ( 1 ) , DummyString ( 1 ) , wo ) ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 0 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 0 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 1 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 1 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 2 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 2 ] ) ;
static_cast < DBImpl * > ( db2 ) - > TEST_WaitForFlushMemTable ( ) ;
static_cast < DBImpl * > ( db2 ) - > TEST_WaitForFlushMemTable ( ) ;
{
{
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " default " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " default " ) +
static_cast < uint64_t > ( 0 ) ) ;
GetNumberOfSstFilesForColumnFamily ( db_ , " cf1 " ) +
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " cf1 " ) ,
GetNumberOfSstFilesForColumnFamily ( db_ , " cf2 " ) ,
static_cast < uint64_t > ( 0 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " cf2 " ) ,
static_cast < uint64_t > ( 1 ) ) ;
static_cast < uint64_t > ( 1 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db2 , " default " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db2 , " default " ) ,
static_cast < uint64_t > ( 0 ) ) ;
static_cast < uint64_t > ( 0 ) ) ;
}
}
// db2: 20KB
// Triggering to flush another CF in DB1
ASSERT_OK ( db2 - > Put ( wo , Key ( 2 ) , DummyString ( 40000 ) ) ) ;
ASSERT_OK ( db2 - > Put ( wo , Key ( 2 ) , DummyString ( 70000 ) ) ) ;
ASSERT_OK ( db2 - > Put ( wo , Key ( 3 ) , DummyString ( 70000 ) ) ) ;
ASSERT_OK ( Put ( 2 , Key ( 1 ) , DummyString ( 1 ) , wo ) ) ;
ASSERT_OK ( db2 - > Put ( wo , Key ( 1 ) , DummyString ( 1 ) ) ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 0 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 0 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 1 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 1 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 2 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 2 ] ) ;
static_cast < DBImpl * > ( db2 ) - > TEST_WaitForFlushMemTable ( ) ;
{
{
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " default " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " default " ) ,
static_cast < uint64_t > ( 0 ) ) ;
static_cast < uint64_t > ( 1 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " cf1 " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " cf1 " ) ,
static_cast < uint64_t > ( 0 ) ) ;
static_cast < uint64_t > ( 0 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " cf2 " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " cf2 " ) ,
static_cast < uint64_t > ( 1 ) ) ;
static_cast < uint64_t > ( 1 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db2 , " default " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db2 , " default " ) ,
static_cast < uint64_t > ( 1 ) ) ;
static_cast < uint64_t > ( 0 ) ) ;
}
}
//
// Triggering flush in DB2.
// Inserting Data in db2 and db_ triggers flushing in db_.
ASSERT_OK ( db2 - > Put ( wo , Key ( 3 ) , DummyString ( 40000 ) ) ) ;
ASSERT_OK ( db2 - > Put ( wo , Key ( 3 ) , DummyString ( 70000 ) ) ) ;
ASSERT_OK ( db2 - > Put ( wo , Key ( 1 ) , DummyString ( 1 ) ) ) ;
ASSERT_OK ( Put ( 2 , Key ( 2 ) , DummyString ( 45000 ) ) ) ;
ASSERT_OK ( Put ( 0 , Key ( 1 ) , DummyString ( 1 ) ) ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 0 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 0 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 1 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 1 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 2 ] ) ;
dbfull ( ) - > TEST_WaitForFlushMemTable ( handles_ [ 2 ] ) ;
static_cast < DBImpl * > ( db2 ) - > TEST_WaitForFlushMemTable ( ) ;
static_cast < DBImpl * > ( db2 ) - > TEST_WaitForFlushMemTable ( ) ;
{
{
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " default " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " default " ) ,
static_cast < uint64_t > ( 0 ) ) ;
static_cast < uint64_t > ( 1 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " cf1 " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " cf1 " ) ,
static_cast < uint64_t > ( 0 ) ) ;
static_cast < uint64_t > ( 0 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " cf2 " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db_ , " cf2 " ) ,
static_cast < uint64_t > ( 2 ) ) ;
static_cast < uint64_t > ( 1 ) ) ;
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db2 , " default " ) ,
ASSERT_EQ ( GetNumberOfSstFilesForColumnFamily ( db2 , " default " ) ,
static_cast < uint64_t > ( 1 ) ) ;
static_cast < uint64_t > ( 1 ) ) ;
}
}