Merge pull request #1047 from PraveenSinghRao/wal_filter_ex

Avoid overloaded virtual function
main
Siying Dong 9 years ago
commit ec458dcdeb
  1. 2
      db/db_impl.cc
  2. 2
      db/db_test2.cc
  3. 3
      include/rocksdb/wal_filter.h

@ -1199,7 +1199,7 @@ Status DBImpl::RecoverLogFiles(const std::vector<uint64_t>& log_numbers,
bool batch_changed = false;
WalFilter::WalProcessingOption wal_processing_option =
db_options_.wal_filter->LogRecord(log_number, fname, batch,
db_options_.wal_filter->LogRecordFound(log_number, fname, batch,
&new_batch, &batch_changed);
switch (wal_processing_option) {

@ -502,7 +502,7 @@ TEST_F(DBTest2, WalFilterTestWithColumnFamilies) {
cf_name_id_map_ = cf_name_id_map;
}
virtual WalProcessingOption LogRecord(unsigned long long log_number,
virtual WalProcessingOption LogRecordFound(unsigned long long log_number,
const std::string& log_file_name,
const WriteBatch& batch,
WriteBatch* new_batch,

@ -75,11 +75,12 @@ class WalFilter {
// @returns Processing option for the current record.
// Please see WalProcessingOption enum above for
// details.
virtual WalProcessingOption LogRecord(unsigned long long log_number,
virtual WalProcessingOption LogRecordFound(unsigned long long log_number,
const std::string& log_file_name,
const WriteBatch& batch,
WriteBatch* new_batch,
bool* batch_changed) {
// Default implementation falls back to older function for compatibility
return LogRecord(batch, new_batch, batch_changed);
}

Loading…
Cancel
Save