Remove db_impl_debug from release build

Summary:
Remove db_impl_debug from NDEBUG, but allow it in ROCKSDB_LITE
These functions by definition should not be included in NDEBUG and they are only used for testing
This is based on offline discussion with @yhchiang and @igor

Test Plan:
make static_lib
make check

Reviewers: igor, sdong, yhchiang

Reviewed By: yhchiang

Subscribers: igor, yhchiang, dhruba

Differential Revision: https://reviews.facebook.net/D48573
main
Islam AbdelRahman 9 years ago
parent c64ae05b1c
commit 7f58ff7c31
  1. 4
      db/db_impl.h
  2. 4
      db/db_impl_debug.cc

@ -254,7 +254,7 @@ class DBImpl : public DB {
Iterator* NewInternalIterator(Arena* arena, Iterator* NewInternalIterator(Arena* arena,
ColumnFamilyHandle* column_family = nullptr); ColumnFamilyHandle* column_family = nullptr);
#ifndef ROCKSDB_LITE #ifndef NDEBUG
// Extra methods (for testing) that are not in the public DB interface // Extra methods (for testing) that are not in the public DB interface
// Implemented in db_impl_debug.cc // Implemented in db_impl_debug.cc
@ -305,7 +305,7 @@ class DBImpl : public DB {
uint64_t TEST_LogfileNumber(); uint64_t TEST_LogfileNumber();
#endif // ROCKSDB_LITE #endif // NDEBUG
// Returns the list of live files in 'live' and the list // Returns the list of live files in 'live' and the list
// of all files in the filesystem in 'candidate_files'. // of all files in the filesystem in 'candidate_files'.

@ -7,7 +7,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors. // found in the LICENSE file. See the AUTHORS file for names of contributors.
#ifndef ROCKSDB_LITE #ifndef NDEBUG
#include "db/db_impl.h" #include "db/db_impl.h"
#include "util/thread_status_updater.h" #include "util/thread_status_updater.h"
@ -136,4 +136,4 @@ uint64_t DBImpl::TEST_LogfileNumber() {
} }
} // namespace rocksdb } // namespace rocksdb
#endif // ROCKSDB_LITE #endif // NDEBUG

Loading…
Cancel
Save