From 7f58ff7c3121b8643a216c9eb8a960c592b49981 Mon Sep 17 00:00:00 2001 From: Islam AbdelRahman Date: Mon, 12 Oct 2015 17:35:43 -0700 Subject: [PATCH] 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 --- db/db_impl.h | 4 ++-- db/db_impl_debug.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/db/db_impl.h b/db/db_impl.h index 4db0cd069..a06169996 100644 --- a/db/db_impl.h +++ b/db/db_impl.h @@ -254,7 +254,7 @@ class DBImpl : public DB { Iterator* NewInternalIterator(Arena* arena, ColumnFamilyHandle* column_family = nullptr); -#ifndef ROCKSDB_LITE +#ifndef NDEBUG // Extra methods (for testing) that are not in the public DB interface // Implemented in db_impl_debug.cc @@ -305,7 +305,7 @@ class DBImpl : public DB { uint64_t TEST_LogfileNumber(); -#endif // ROCKSDB_LITE +#endif // NDEBUG // Returns the list of live files in 'live' and the list // of all files in the filesystem in 'candidate_files'. diff --git a/db/db_impl_debug.cc b/db/db_impl_debug.cc index ee437ea2b..73dca560d 100644 --- a/db/db_impl_debug.cc +++ b/db/db_impl_debug.cc @@ -7,7 +7,7 @@ // 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. -#ifndef ROCKSDB_LITE +#ifndef NDEBUG #include "db/db_impl.h" #include "util/thread_status_updater.h" @@ -136,4 +136,4 @@ uint64_t DBImpl::TEST_LogfileNumber() { } } // namespace rocksdb -#endif // ROCKSDB_LITE +#endif // NDEBUG