fix build for rocksdb lite

Summary:
currently rocksdb lite build fails due to the following errors:
> db/db_sst_test.cc:29:51: error: ‘FlushJobInfo’ does not name a type
   virtual void OnFlushCompleted(DB* /*db*/, const FlushJobInfo& info) override {
                                                   ^
db/db_sst_test.cc:29:16: error: ‘virtual void rocksdb::FlushedFileCollector::OnFlushCompleted(rocksdb::DB*, const int&)’ marked ‘override’, but does not override
   virtual void OnFlushCompleted(DB* /*db*/, const FlushJobInfo& info) override {
                ^
db/db_sst_test.cc:24:7: error: ‘class rocksdb::FlushedFileCollector’ has virtual functions and accessible non-virtual destructor [-Werror=non-virtual-dtor]
 class FlushedFileCollector : public EventListener {
       ^
db/db_sst_test.cc: In member function ‘virtual void rocksdb::FlushedFileCollector::OnFlushCompleted(rocksdb::DB*, const int&)’:
db/db_sst_test.cc:31:35: error: request for member ‘file_path’ in ‘info’, which is of non-class type ‘const int’
     flushed_files_.push_back(info.file_path);
                                   ^
cc1plus: all warnings being treated as errors
make: *** [db/db_sst_test.o] Error 1
Closes https://github.com/facebook/rocksdb/pull/3676

Differential Revision: D7493006

Pulled By: miasantreble

fbshipit-source-id: 77dff0a5b23e27db51be9b9798e3744e6fdec64f
This commit is contained in:
Zhongyi Xie 2018-04-05 09:08:18 -07:00 committed by Facebook Github Bot
parent 7d9067991e
commit c827b2dc2a

View File

@ -20,6 +20,7 @@ class DBSSTTest : public DBTestBase {
DBSSTTest() : DBTestBase("/db_sst_test") {} DBSSTTest() : DBTestBase("/db_sst_test") {}
}; };
#ifndef ROCKSDB_LITE
// A class which remembers the name of each flushed file. // A class which remembers the name of each flushed file.
class FlushedFileCollector : public EventListener { class FlushedFileCollector : public EventListener {
public: public:
@ -48,6 +49,7 @@ class FlushedFileCollector : public EventListener {
std::vector<std::string> flushed_files_; std::vector<std::string> flushed_files_;
std::mutex mutex_; std::mutex mutex_;
}; };
#endif // ROCKSDB_LITE
TEST_F(DBSSTTest, DontDeletePendingOutputs) { TEST_F(DBSSTTest, DontDeletePendingOutputs) {
Options options; Options options;