Avoid overloaded virtual function

This commit is contained in:
Praveen Rao 2016-03-22 17:10:31 -07:00
parent 136b8e0cad
commit 583157f710
3 changed files with 4 additions and 3 deletions

View File

@ -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) {

View File

@ -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,

View File

@ -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);
}