Disable lite build/testing for persistent read cache

Summary:
Persistent read cache isn't very applicable for lite builds. Wrapping
the code with #ifndef ROCKSDB_LITE .. #endif

Test Plan: Run unit, lite, lite_test

Reviewers: sdong

Subscribers: andrewkr, dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D58563
This commit is contained in:
krad 2016-05-20 16:16:51 -07:00
parent 1d725ca51d
commit 4e7e41ba77
5 changed files with 20 additions and 0 deletions

View File

@ -5,6 +5,8 @@
//
#pragma once
#ifndef ROCKSDB_LITE
#include <assert.h>
#include <sys/mman.h>
#include <list>
@ -224,3 +226,5 @@ class HashTable {
};
} // namespace rocksdb
#endif

View File

@ -4,6 +4,8 @@
// of patent rights can be found in the PATENTS file in the same directory.
//
#ifndef ROCKSDB_LITE
#include <gflags/gflags.h>
#include <sys/time.h>
#include <unistd.h>
@ -292,3 +294,6 @@ int main(int argc, char** argv) {
return 0;
}
#else
int main(int /*argc*/, char** /*argv*/) { return 0; }
#endif

View File

@ -5,6 +5,8 @@
//
#pragma once
#ifndef ROCKSDB_LITE
#include "utilities/persistent_cache/hash_table.h"
#include "utilities/persistent_cache/lrulist.h"
@ -158,3 +160,5 @@ class EvictableHashTable : private HashTable<T*, Hash, Equal> {
};
} // namespace rocksdb
#endif

View File

@ -13,6 +13,8 @@
#include "utilities/persistent_cache/hash_table.h"
#include "utilities/persistent_cache/hash_table_evictable.h"
#ifndef ROCKSDB_LITE
namespace rocksdb {
struct HashTableTest : public testing::Test {
@ -145,6 +147,7 @@ TEST_F(EvictableHashTableTest, TestEvict) {
}
} // namespace rocksdb
#endif
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);

View File

@ -5,6 +5,8 @@
//
#pragma once
#ifndef ROCKSDB_LITE
#include <atomic>
#include "util/mutexlock.h"
@ -168,3 +170,5 @@ class LRUList {
};
} // namespace rocksdb
#endif