Merge pull request #1047 from PraveenSinghRao/wal_filter_ex
Avoid overloaded virtual function
This commit is contained in:
commit
ec458dcdeb
@ -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…
Reference in New Issue
Block a user