]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Fix RocksDB Lite build with CLANG
authorSiying Dong <siying.d@fb.com>
Mon, 12 Jun 2017 13:32:01 +0000 (06:32 -0700)
committerYi Wu <yiwu@fb.com>
Mon, 17 Jul 2017 21:27:24 +0000 (14:27 -0700)
Summary: Closes https://github.com/facebook/rocksdb/pull/2419

Differential Revision: D5193976

Pulled By: siying

fbshipit-source-id: 62d115edee6043237e9d6ad3c2a05481e162c9eb

db/compaction_iterator.cc
db/compaction_iterator.h
util/file_reader_writer.h

index 5c1e6bbe8ef9a9a6217690c4f4e9449b142019c6..a89d16fccd8d34419a9ab6c78786f8951bdc0dbc 100644 (file)
@@ -71,7 +71,9 @@ CompactionIterator::CompactionIterator(
       range_del_agg_(range_del_agg),
       compaction_(std::move(compaction)),
       compaction_filter_(compaction_filter),
+#ifndef ROCKSDB_LITE
       compaction_listener_(compaction_listener),
+#endif  // ROCKSDB_LITE
       shutting_down_(shutting_down),
       ignore_snapshots_(false),
       merge_out_iter_(merge_helper_) {
index b89fe088d6bbaf2c0990f899bf8c7542dd3fe550..10f13fd139dfca7b7b4a8ae4c8b4f7a4a42a19b7 100644 (file)
@@ -134,7 +134,9 @@ class CompactionIterator {
   RangeDelAggregator* range_del_agg_;
   std::unique_ptr<CompactionProxy> compaction_;
   const CompactionFilter* compaction_filter_;
+#ifndef ROCKSDB_LITE
   CompactionEventListener* compaction_listener_;
+#endif  // ROCKSDB_LITE
   const std::atomic<bool>* shutting_down_;
   bool bottommost_level_;
   bool valid_ = false;
index 8de41a2033994fc4d8070bf0135f1a6d9bb40979..2823463e00a3fc00b48c2ca3700a89c4edb7fe8d 100644 (file)
@@ -118,10 +118,12 @@ class WritableFileWriter {
   // Actually written data size can be used for truncate
   // not counting padding data
   uint64_t                filesize_;
+#ifndef ROCKSDB_LITE
   // This is necessary when we use unbuffered access
   // and writes must happen on aligned offsets
   // so we need to go back and write that page again
   uint64_t                next_write_offset_;
+#endif  // ROCKSDB_LITE
   bool                    pending_sync_;
   uint64_t                last_sync_size_;
   uint64_t                bytes_per_sync_;
@@ -135,7 +137,9 @@ class WritableFileWriter {
         buf_(),
         max_buffer_size_(options.writable_file_max_buffer_size),
         filesize_(0),
+#ifndef ROCKSDB_LITE
         next_write_offset_(0),
+#endif  // ROCKSDB_LITE
         pending_sync_(false),
         last_sync_size_(0),
         bytes_per_sync_(options.bytes_per_sync),