Fix compile issues introduced by RocksDBLite

main
Igor Canadi 11 years ago
parent 588bca2020
commit c166615850
  1. 18
      db/db_impl.cc
  2. 3
      db/db_impl_debug.cc

@ -892,6 +892,16 @@ void DBImpl::PurgeObsoleteWALFiles() {
}
}
namespace {
struct CompareLogByPointer {
bool operator()(const unique_ptr<LogFile>& a, const unique_ptr<LogFile>& b) {
LogFileImpl* a_impl = dynamic_cast<LogFileImpl*>(a.get());
LogFileImpl* b_impl = dynamic_cast<LogFileImpl*>(b.get());
return *a_impl < *b_impl;
}
};
}
Status DBImpl::GetSortedWalsOfType(const std::string& path,
VectorLogPtr& log_files,
WalFileType log_type) {
@ -1045,14 +1055,6 @@ Status DBImpl::ReadFirstLine(const std::string& fname,
return status;
}
struct CompareLogByPointer {
bool operator()(const unique_ptr<LogFile>& a, const unique_ptr<LogFile>& b) {
LogFileImpl* a_impl = dynamic_cast<LogFileImpl*>(a.get());
LogFileImpl* b_impl = dynamic_cast<LogFileImpl*>(b.get());
return *a_impl < *b_impl;
}
};
#endif // ROCKSDB_LITE
Status DBImpl::Recover(

@ -11,6 +11,8 @@
#include "db/db_impl.h"
namespace rocksdb {
void DBImpl::TEST_PurgeObsoleteteWAL() { PurgeObsoleteWALFiles(); }
uint64_t DBImpl::TEST_GetLevel0TotalSize() {
@ -116,4 +118,5 @@ Status DBImpl::TEST_WaitForCompact() {
}
return bg_error_;
}
} // namespace rocksdb
#endif // NDEBUG

Loading…
Cancel
Save