Summary: Fixed a compile warning in db_stress in NDEBUG mode. Test Plan: make OPT=-DNDEBUG db_stress Reviewers: sdong, anthony Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D39213
@ -845,6 +845,7 @@ class DbStressListener : public EventListener {
}
void VerifyFileDir(const std::string& file_dir) {
#ifndef NDEBUG
if (db_name_ == file_dir) {
return;
@ -854,17 +855,21 @@ class DbStressListener : public EventListener {
assert(false);
#endif // !NDEBUG
void VerifyFileName(const std::string& file_name) {
uint64_t file_number;
FileType file_type;
bool result = ParseFileName(file_name, &file_number, &file_type);
assert(result);
assert(file_type == kTableFile);
void VerifyFilePath(const std::string& file_path) {
size_t pos = file_path.find_last_of("/");
if (pos == std::string::npos) {
VerifyFileName(file_path);
@ -874,6 +879,7 @@ class DbStressListener : public EventListener {
VerifyFileName(file_path.substr(pos));
#endif // !ROCKSDB_LITE