Fix LITE Build (#4989)

Summary:
LITE mode has EventListener to be an empty class. However in db_bench,
it is used. When "override" is added to the functions, the build breaks. Fix it
by keeping the listener empty in LITE mode.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/4989

Differential Revision: D14108132

Pulled By: siying

fbshipit-source-id: 80121aab35b1120e502b37b782301dd700692697
This commit is contained in:
Siying Dong 2019-02-15 16:10:37 -08:00 committed by Facebook Github Bot
parent 3231a2e581
commit 4db46aa2e6

View File

@ -2044,6 +2044,7 @@ class Benchmark {
class ErrorHandlerListener : public EventListener {
public:
#ifndef ROCKSDB_LITE
ErrorHandlerListener()
: mutex_(),
cv_(&mutex_),
@ -2085,6 +2086,10 @@ class Benchmark {
InstrumentedCondVar cv_;
bool no_auto_recovery_;
bool recovery_complete_;
#else // ROCKSDB_LITE
bool WaitForRecovery(uint64_t /*abs_time_us*/) { return true; }
void EnableAutoRecovery(bool /*enable*/) {}
#endif // ROCKSDB_LITE
};
std::shared_ptr<ErrorHandlerListener> listener_;