Skip to content

Commit

Permalink
Disable lite build/testing for persistent read cache
Browse files Browse the repository at this point in the history
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
  • Loading branch information
krad committed May 23, 2016
1 parent 1d725ca commit 4e7e41b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions utilities/persistent_cache/hash_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
//
#pragma once

#ifndef ROCKSDB_LITE

#include <assert.h>
#include <sys/mman.h>
#include <list>
Expand Down Expand Up @@ -224,3 +226,5 @@ class HashTable {
};

} // namespace rocksdb

#endif
5 changes: 5 additions & 0 deletions utilities/persistent_cache/hash_table_bench.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -292,3 +294,6 @@ int main(int argc, char** argv) {

return 0;
}
#else
int main(int /*argc*/, char** /*argv*/) { return 0; }
#endif
4 changes: 4 additions & 0 deletions utilities/persistent_cache/hash_table_evictable.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
//
#pragma once

#ifndef ROCKSDB_LITE

#include "utilities/persistent_cache/hash_table.h"
#include "utilities/persistent_cache/lrulist.h"

Expand Down Expand Up @@ -158,3 +160,5 @@ class EvictableHashTable : private HashTable<T*, Hash, Equal> {
};

} // namespace rocksdb

#endif
3 changes: 3 additions & 0 deletions utilities/persistent_cache/hash_table_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -145,6 +147,7 @@ TEST_F(EvictableHashTableTest, TestEvict) {
}

} // namespace rocksdb
#endif

int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
Expand Down
4 changes: 4 additions & 0 deletions utilities/persistent_cache/lrulist.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
//
#pragma once

#ifndef ROCKSDB_LITE

#include <atomic>

#include "util/mutexlock.h"
Expand Down Expand Up @@ -168,3 +170,5 @@ class LRUList {
};

} // namespace rocksdb

#endif

0 comments on commit 4e7e41b

Please sign in to comment.