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
main
krad 9 years ago
parent 1d725ca51d
commit 4e7e41ba77
  1. 4
      utilities/persistent_cache/hash_table.h
  2. 5
      utilities/persistent_cache/hash_table_bench.cc
  3. 4
      utilities/persistent_cache/hash_table_evictable.h
  4. 3
      utilities/persistent_cache/hash_table_test.cc
  5. 4
      utilities/persistent_cache/lrulist.h

@ -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

@ -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

@ -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

@ -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);

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

Loading…
Cancel
Save