GithubHelp home page GithubHelp logo

tikv / rust-rocksdb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rust-rocksdb/rust-rocksdb

275.0 39.0 157.0 11 MB

rust wrapper for rocksdb

License: Apache License 2.0

Rust 72.80% Shell 0.26% C++ 17.02% C 9.63% Makefile 0.10% Python 0.19%
rust rocksdb

rust-rocksdb's Introduction

rust-rocksdb

Build Status Dependency Status

This library has been tested against RocksDB 6.4 on Linux and macOS.

Status

  • basic open/put/get/delete/close
  • rustic merge operator
  • write batch (thanks @dgrnbrg!)
  • save point
  • compaction filter, style
  • LRU cache
  • destroy/repair
  • iterator
  • comparator
  • snapshot
  • column family operations
  • prefix seek
  • slicetransform
  • rate limiter
  • statistics
  • recovery
  • backup
  • pause/continue background work
  • delete range
  • ingest external sst files
  • windows support

Feedback and pull requests welcome! If a particular feature of RocksDB is important to you, please let us know by opening an issue, and we will prioritize it.

Build

$ git submodule update --init --recursive # if you just cloned the repository
$ cargo build

Bindings are pre-generated for x86_64 Linux. For other platforms, bindings are generated at compile time.

If the content in librocksdb_sys/crocksdb/crocksdb/c.h is updated, you may need to regenerate bindings:

$ ./scripts/generate-bindings.sh

Running

Cargo.toml
[dependencies.rocksdb]
git = "https://github.com/tikv/rust-rocksdb.git"
Code
extern crate rocksdb;
use rocksdb::{DB, Writable};

fn main() {
    let mut db = DB::open_default("/path/for/rocksdb/storage").unwrap();
    db.put(b"my key", b"my value");
    match db.get(b"my key") {
        Ok(Some(value)) => println!("retrieved value {}", value.to_utf8().unwrap()),
        Ok(None) => println!("value not found"),
        Err(e) => println!("operational problem encountered: {}", e),
    }

    db.delete(b"my key");
}
Doing an atomic commit of several writes
extern crate rocksdb;
use rocksdb::{DB, WriteBatch, Writable};

fn main() {
    // NB: db is automatically freed at end of lifetime
    let mut db = DB::open_default("/path/for/rocksdb/storage").unwrap();
    {
        let batch = WriteBatch::new(); // WriteBatch and db both have trait Writable
        batch.put(b"my key", b"my value");
        batch.put(b"key2", b"value2");
        batch.put(b"key3", b"value3");
        db.write(&batch).unwrap(); // Atomically commits the batch
    }
}
Getting an Iterator
extern crate rocksdb;
use rocksdb::{DB, Direction, IteratorMode};

fn main() {
    // NB: db is automatically freed at end of lifetime
    let mut db = DB::open_default("/path/for/rocksdb/storage").unwrap();
    let mut iter = db.iterator(IteratorMode::Start); // Always iterates forward
    for (key, value) in iter {
        println!("Saw {} {}", key, value); //actually, need to convert [u8] keys into Strings
    }
    iter = db.iterator(IteratorMode::End);  // Always iterates backward
    for (key, value) in iter {
        println!("Saw {} {}", key, value);
    }
    iter = db.iterator(IteratorMode::From(b"my key", Direction::forward)); // From a key in Direction::{forward,reverse}
    for (key, value) in iter {
        println!("Saw {} {}", key, value);
    }

    // You can seek with an existing Iterator instance, too
    iter.set_mode(IteratorMode::From(b"another key", Direction::reverse));
    for (key, value) in iter {
        println!("Saw {} {}", key, value);
    }
}
Getting an Iterator from a Snapshot
extern crate rocksdb;
use rocksdb::{DB, Direction};

fn main() {
    // NB: db is automatically freed at end of lifetime
    let mut db = DB::open_default("/path/for/rocksdb/storage").unwrap();
    let snapshot = db.snapshot(); // Creates a longer-term snapshot of the DB, but freed when goes out of scope
    let mut iter = snapshot.iterator(IteratorMode::Start); // Make as many iterators as you'd like from one snapshot
}
Rustic Merge Operator
extern crate rocksdb;
use rocksdb::{Options, DB, MergeOperands, Writable};

fn concat_merge(new_key: &[u8], existing_val: Option<&[u8]>,
    operands: &mut MergeOperands) -> Vec<u8> {
    let mut result: Vec<u8> = Vec::with_capacity(operands.size_hint().0);
    existing_val.map(|v| {
        for e in v {
            result.push(*e)
        }
    });
    for op in operands {
        for e in op {
            result.push(*e)
        }
    }
    result
}

fn main() {
    let path = "/path/to/rocksdb";
    let mut opts = Options::new();
    opts.create_if_missing(true);
    opts.add_merge_operator("test operator", concat_merge);
    let mut db = DB::open(&opts, path).unwrap();
    let p = db.put(b"k1", b"a");
    db.merge(b"k1", b"b");
    db.merge(b"k1", b"c");
    db.merge(b"k1", b"d");
    db.merge(b"k1", b"efg");
    let r = db.get(b"k1");
    assert!(r.unwrap().unwrap().to_utf8().unwrap() == "abcdefg");
}
Apply Some Tunings

Please read the official tuning guide, and most importantly, measure performance under realistic workloads with realistic hardware.

use rocksdb::{Options, DB};
use rocksdb::DBCompactionStyle::DBUniversalCompaction;

fn badly_tuned_for_somebody_elses_disk() -> DB {
    let path = "_rust_rocksdb_optimizetest";
    let mut opts = Options::new();
    opts.create_if_missing(true);
    opts.set_max_open_files(10000);
    opts.set_use_fsync(false);
    opts.set_bytes_per_sync(8388608);
    opts.set_disable_data_sync(false);
    opts.set_block_cache_size_mb(1024);
    opts.set_table_cache_num_shard_bits(6);
    opts.set_max_write_buffer_number(32);
    opts.set_write_buffer_size(536870912);
    opts.set_target_file_size_base(1073741824);
    opts.set_min_write_buffer_number_to_merge(4);
    opts.set_level_zero_stop_writes_trigger(2000);
    opts.set_level_zero_slowdown_writes_trigger(0);
    opts.set_compaction_style(DBUniversalCompaction);
    opts.set_max_background_compactions(4);
    opts.set_max_background_flushes(4);
    opts.set_disable_auto_compactions(true);

    DB::open(&opts, path).unwrap()
}

rust-rocksdb's People

Contributors

andelf avatar andreyg avatar arthurprs avatar aya avatar brson avatar busyjay avatar connor1996 avatar dgrnbrg avatar disksing avatar dorianzheng avatar ethercflow avatar follitude avatar fredbjer avatar hhkbp2 avatar hicqu avatar huachaohuang avatar hunterlxt avatar koushiro avatar little-wallace avatar messense avatar ngaut avatar overvenus avatar siddontang avatar spacejam avatar spadea-tang avatar sre-bot avatar tabokie avatar ti-srebot avatar yiwu-arbug avatar zhangjinpeng87 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rust-rocksdb's Issues

Feature Request/Task Tracking: User Properties Collector

related: #66

TODOs:

Functions:

  • DB::GetPropertiesOfAllTables & DB::GetPropertiesOfTablesInRange
  • Options::table_properties_collector_factories (is de facto a std::vector)

Interfaces/Traits:

  • TablePropertiesCollectorFactory
    • CreateTablePropertiesCollector
  • TablePropertiesCollector
    • AddUserKey
    • Finish
    • GetReadableProperties neglectable

Types:

  • TablePropertiesCollection
    • std::unordered_map<std::string, std::shared_ptr<const TableProperties>>
  • UserCollectedProperties - the key for access/setting customized props
    • std::map<std::string, std::string>
  • TableProperties
    • Fielded struct with 2 UserCollectedProperties members
  • other: string keys, EntryType enum, Context.

Compile error: PRIu64

image

We need to go through all codes using PRIu64 and make sure we can compile it, this is only a reminder for pingcap/rocksdb/titan-5.15

Compilation error on Linux

Error messages are as follow:

In file included from /home/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/0826c1f/librocksdb_sys/rocksdb/db/memtable.h:21,
                 from /home/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/0826c1f/librocksdb_sys/rocksdb/db/memtable_list.h:17,
                 from /home/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/0826c1f/librocksdb_sys/rocksdb/db/column_family.h:17,
                 from /home/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/0826c1f/librocksdb_sys/rocksdb/db/version_set.h:31,
                 from /home/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/0826c1f/librocksdb_sys/rocksdb/db/compaction.h:11,
                 from /home/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/0826c1f/librocksdb_sys/rocksdb/db/compaction_iterator.h:12,
                 from /home/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/0826c1f/librocksdb_sys/rocksdb/db/builder.cc:16:
/home/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/0826c1f/librocksdb_sys/rocksdb/db/version_edit.h: In constructor โ€˜rocksdb::FdWithKeyRange::FdWithKeyRange(rocksdb::FileDescriptor, rocksdb::Slice, rocksdb::Slice, rocksdb::FileMetaData*)โ€™:
/home/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/0826c1f/librocksdb_sys/rocksdb/db/version_edit.h:178:33: error: implicitly-declared โ€˜constexpr rocksdb::FileDescriptor::FileDescriptor(const rocksdb::FileDescriptor&)โ€™ is deprecated [-Werror=deprecated-copy]
  178 |         largest_key(_largest_key) {}
      |                                 ^
/home/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/0826c1f/librocksdb_sys/rocksdb/db/version_edit.h:55:19: note: because โ€˜rocksdb::FileDescriptorโ€™ has user-provided โ€˜rocksdb::FileDescriptor& rocksdb::FileDescriptor::operator=(const rocksdb::FileDescriptor&)โ€™
   55 |   FileDescriptor& operator=(const FileDescriptor& fd) {
      |                   ^~~~~~~~
/home/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/0826c1f/librocksdb_sys/rocksdb/db/version_edit.h: In instantiation of โ€˜constexpr std::pair<_T1, _T2>::pair(_U1&&, _U2&&) [with _U1 = int&; _U2 = rocksdb::FileMetaData; typename std::enable_if<(std::_PCC<true, _T1, _T2>::_MoveConstructiblePair<_U1, _U2>() && std::_PCC<true, _T1, _T2>::_ImplicitlyMoveConvertiblePair<_U1, _U2>()), bool>::type <anonymous> = true; _T1 = int; _T2 = rocksdb::FileMetaData]โ€™:
/usr/include/c++/9/ext/new_allocator.h:147:4:   required from โ€˜void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = std::pair<int, rocksdb::FileMetaData>; _Args = {int&, rocksdb::FileMetaData}; _Tp = std::pair<int, rocksdb::FileMetaData>]โ€™
/usr/include/c++/9/bits/alloc_traits.h:484:4:   required from โ€˜static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = std::pair<int, rocksdb::FileMetaData>; _Args = {int&, rocksdb::FileMetaData}; _Tp = std::pair<int, rocksdb::FileMetaData>; std::allocator_traits<std::allocator<_CharT> >::allocator_type = std::allocator<std::pair<int, rocksdb::FileMetaData> >]โ€™
/usr/include/c++/9/bits/vector.tcc:115:30:   required from โ€˜void std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {int&, rocksdb::FileMetaData}; _Tp = std::pair<int, rocksdb::FileMetaData>; _Alloc = std::allocator<std::pair<int, rocksdb::FileMetaData> >]โ€™
/home/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/0826c1f/librocksdb_sys/rocksdb/db/version_edit.h:249:48:   required from here
...

The distribution I'm using is Fedora 30. Extra information as listed:

% rustc --version
rustc 1.36.0-nightly (e305df184 2019-04-24)
% g++ --version
g++ (GCC) 9.1.1 20190503 (Red Hat 9.1.1-1)
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% uname -r
5.0.13-300.fc30.x86_64

LogWriter to only flush after finish generating whole record

see RocksDB https://github.com/facebook/rocksdb/pull/5328/files

In my local test, I find some time is taken in Flush:

image

And I find this PR and just do a simple test in TiKV with 1 PD + 1 TiKV

go-ycsb load tikv  -p tikv.type=raw  -p recordcount=10000000000

With this change:

INSERT - Takes(s): 9.9, Count: 154287, OPS: 15526.3, Avg(us): 6431, Min(us): 598, Max(us): 118534, 95th(us): 11000, 99th(us): 23000
INSERT - Takes(s): 19.9, Count: 306663, OPS: 15385.5, Avg(us): 6489, Min(us): 598, Max(us): 142346, 95th(us): 12000, 99th(us): 22000
INSERT - Takes(s): 29.9, Count: 452736, OPS: 15125.5, Avg(us): 6593, Min(us): 598, Max(us): 155441, 95th(us): 12000, 99th(us): 23000

Without this change:

INSERT - Takes(s): 9.9, Count: 146837, OPS: 14790.9, Avg(us): 6771, Min(us): 803, Max(us): 125443, 95th(us): 12000, 99th(us): 26000
INSERT - Takes(s): 19.9, Count: 296393, OPS: 14873.5, Avg(us): 6713, Min(us): 648, Max(us): 138450, 95th(us): 12000, 99th(us): 25000
INSERT - Takes(s): 29.9, Count: 437955, OPS: 14633.1, Avg(us): 6816, Min(us): 648, Max(us): 188033, 95th(us): 12000, 99th(us): 25000

QPS is increased by 3%, so I think it is worth to add this change.

PTAL @yiwu-arbug @zhangjinpeng1987

CompressionType

How add a new compression type such as gzip or openssl for rust-rocksdb?And then how to build it for the TiKV storage engine?Thanks.

Should not update titan repository during build time

Source code is expected to be consistent during build time, but update_titan features update the submodule to the latest version. It's an abuse of features, which breaks the purpose of versioning.

I suggest to remove the features completely and use make target to update submodules.

/cc @nrc @siddontang

PCP-27: level compaction skip some sst to reduce write amplification

Description

Ln sst1[a...b e...f]
Ln+1 sst2[a...b] sst3[c...d] sst4[e...f]
Assume a level compaction picks sst1, sst2, sst3 and sst4 as source ssts, we can see sst3's key range is a gap in sst1, but their ranges overlaps. And sst3's content will be unnecessarily re-written in level n+1, this will cause write amplification.
In TiDB the gap between index keys and row keys for the same row is broad, and will cause extra write amplification.

Difficulty

  • Hard

Score

  • 3600

Mentor(s)

Recommended Skills

  • Algorithm

pure virtual method called, terminate called without an active exception

Seems related to facebook/rocksdb#649

Backtrace:

(gdb) bt full
#0  0x00007fec6328a428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
        resultvar = 0
        pid = 15954
        selftid = 15979
#1  0x00007fec6328c02a in __GI_abort () at abort.c:89
        save_stage = 2
        act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {140653252893695, 140653256353088, 45, 45, 94051937857424, 45, 140653252895626,
              140653189122032, 45, 140653256353088, 94051937857424, 45, 1, 140653241551968, 140653252851643, 94051932111120}}, sa_flags = 1600113056,
          sa_restorer = 0x7fec5f5fca98}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#2  0x0000558a2c16904d in __gnu_cxx::__verbose_terminate_handler() ()
No symbol table info available.
#3  0x0000558a2c00fc46 in __cxxabiv1::__terminate(void (*)()) ()
No symbol table info available.
#4  0x0000558a2c00fc81 in std::terminate() ()
No symbol table info available.
#5  0x0000558a2c01012f in __cxa_pure_virtual ()
No symbol table info available.
#6  0x0000558a2bd9c758 in rocksdb::DBImpl::FindObsoleteFiles (this=0x7fec62237000, job_context=0x7fec5f5fca60, force=true, no_full_scan=false)
    at /root/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/d2fe0a9/librocksdb_sys/rocksdb/db/db_impl_files.cc:201
        files = {<std::_Vector_base<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> = {
            _M_impl = {<std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >> = {<__gnu_cxx::new_allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}
        path_id = 0
        doing_the_full_scan = true
        __PRETTY_FUNCTION__ = "void rocksdb::DBImpl::FindObsoleteFiles(rocksdb::JobContext*, bool, bool)"
#7  0x0000558a2bd4453c in rocksdb::DBImpl::~DBImpl (this=0x7fec62237000, __in_chrg=<optimized out>)
    at /root/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/d2fe0a9/librocksdb_sys/rocksdb/db/db_impl.cc:308
        job_context = {job_id = 2,
          full_scan_candidate_files = {<std::_Vector_base<rocksdb::JobContext::CandidateFileInfo, std::allocator<rocksdb::JobContext::CandidateFileInfo> >> = {
              _M_impl = {<std::allocator<rocksdb::JobContext::CandidateFileInfo>> = {<__gnu_cxx::new_allocator<rocksdb::JobContext::CandidateFileInfo>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>},
          sst_live = {<std::_Vector_base<rocksdb::FileDescriptor, std::allocator<rocksdb::FileDescriptor> >> = {
              _M_impl = {<std::allocator<rocksdb::FileDescriptor>> = {<__gnu_cxx::new_allocator<rocksdb::FileDescriptor>> = {<No data fields>}, <No data fields>},
                _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>},
          sst_delete_files = {<std::_Vector_base<rocksdb::FileMetaData*, std::allocator<rocksdb::FileMetaData*> >> = {
              _M_impl = {<std::allocator<rocksdb::FileMetaData*>> = {<__gnu_cxx::new_allocator<rocksdb::FileMetaData*>> = {<No data fields>}, <No data fields>}, _M_start = 0x0,
                _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}, log_delete_files = {<std::_Vector_base<unsigned long, std::allocator<unsigned long> >> = {
              _M_impl = {<std::allocator<unsigned long>> = {<__gnu_cxx::new_allocator<unsigned long>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0,
                _M_end_of_storage = 0x0}}, <No data fields>}, log_recycle_files = {<std::_Vector_base<unsigned long, std::allocator<unsigned long> >> = {
              _M_impl = {<std::allocator<unsigned long>> = {<__gnu_cxx::new_allocator<unsigned long>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0,
                _M_end_of_storage = 0x0}}, <No data fields>},
          manifest_delete_files = {<std::_Vector_base<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> = {
              _M_impl = {<std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >> = {<__gnu_cxx::new_allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0,
                _M_end_of_storage = 0x0}}, <No data fields>}, memtables_to_free = {num_stack_items_ = 0, values_ = {0x7fec5f5fcc60, 0x7fec5f5fcc18, 0x7fec5f5fcc18, 0x0,
              0x7fec62264300, 0x0, 0x0, 0x7fec62264300}, vect_ = {<std::_Vector_base<rocksdb::MemTable*, std::allocator<rocksdb::MemTable*> >> = {
                _M_impl = {<std::allocator<rocksdb::MemTable*>> = {<__gnu_cxx::new_allocator<rocksdb::MemTable*>> = {<No data fields>}, <No data fields>}, _M_start = 0x0,
---Type <return> to continue, or q <return> to quit---
                  _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}}, superversions_to_free = {num_stack_items_ = 0, values_ = {0x1, 0x0, 0x0, 0x7fec62264300, 0x0,
              0x0, 0x0, 0x7fec62264300}, vect_ = {<std::_Vector_base<rocksdb::SuperVersion*, std::allocator<rocksdb::SuperVersion*> >> = {
                _M_impl = {<std::allocator<rocksdb::SuperVersion*>> = {<__gnu_cxx::new_allocator<rocksdb::SuperVersion*>> = {<No data fields>}, <No data fields>},
                  _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}}, logs_to_free = {num_stack_items_ = 0, values_ = {0x0, 0x1, 0x0,
              0x7fec62264300, 0x0, 0x558a2bcf357e <core::ptr::drop_in_place::h5e85685604f319cd+14>, 0x7fec5f5fcc18, 0x558a2bcf2af6 <core::mem::drop::h9876f19c4cb5f87b+6>},
            vect_ = {<std::_Vector_base<rocksdb::log::Writer*, std::allocator<rocksdb::log::Writer*> >> = {
                _M_impl = {<std::allocator<rocksdb::log::Writer*>> = {<__gnu_cxx::new_allocator<rocksdb::log::Writer*>> = {<No data fields>}, <No data fields>}, _M_start = 0x0,
                  _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}}, new_superversion = 0x0, manifest_file_number = 1, pending_manifest_file_number = 0,
          log_number = 0, prev_log_number = 0, min_pending_output = 18446744073709551615, prev_total_log_size = 0, num_alive_log_files = 0, size_log_to_delete = 0}
        bottom_compactions_unscheduled = 0
        compactions_unscheduled = 0
        flushes_unscheduled = 0
#8  0x0000558a2bd44be4 in rocksdb::DBImpl::~DBImpl (this=0x7fec62237000, __in_chrg=<optimized out>)
    at /root/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/d2fe0a9/librocksdb_sys/rocksdb/db/db_impl.cc:357
No locals.
#9  0x0000558a2bcfe377 in crocksdb_close (db=0x7fec6220e0a0) at crocksdb/c.cc:625
No locals.
#10 0x0000558a2bcd2d22 in _$LT$rocksdb..rocksdb..DB$u20$as$u20$core..ops..drop..Drop$GT$::drop::h2ac165b0cf253c3d (self=0x7fec62263a98)
    at /root/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/d2fe0a9/src/rocksdb.rs:1582
No locals.
#11 0x0000558a2bba0cc1 in core::ptr::drop_in_place::h97fab4ada650e341 () at /checkout/src/libcore/ptr.rs:59
No locals.
#12 0x0000558a2bb9f57e in core::ptr::drop_in_place::h3a6be14143cc2e2e () at /checkout/src/libcore/ptr.rs:59
No locals.
#13 0x0000558a2bb9e6a2 in core::ptr::drop_in_place::h072cfe027ee67582 () at /checkout/src/libcore/ptr.rs:59
No locals.
#14 0x0000558a2bbdc149 in _$LT$alloc..arc..Arc$LT$T$GT$$GT$::drop_slow::h0e11a16304d8b69e (self=0x7fec62223618) at /checkout/src/liballoc/arc.rs:518
No locals.
#15 0x0000558a2bbdc698 in _$LT$alloc..arc..Arc$LT$T$GT$$u20$as$u20$core..ops..drop..Drop$GT$::drop::h926d7cd4ebb7d763 (self=0x7fec62223618) at /checkout/src/liballoc/arc.rs:970
No locals.
#16 0x0000558a2bba296e in core::ptr::drop_in_place::hfd82c084fa5c60fd () at /checkout/src/libcore/ptr.rs:59
No locals.
#17 0x0000558a2bb9e446 in core::ptr::drop_in_place::h00c7f93423fb69d6 () at /checkout/src/libcore/ptr.rs:59
No locals.
#18 0x0000558a2bb9ffde in core::ptr::drop_in_place::h68e30018dc1d3716 () at /checkout/src/libcore/ptr.rs:59
No locals.
#19 0x0000558a2bb9f802 in core::ptr::drop_in_place::h429703ace45d86ca () at /checkout/src/libcore/ptr.rs:59
No locals.
#20 0x0000558a2bb9ecee in core::ptr::drop_in_place::h20572535cde93bfb () at /checkout/src/libcore/ptr.rs:59
No locals.
#21 0x0000558a2c269d57 in core::ptr::drop_in_place::ha34938100ebf2a42 () at /checkout/src/libcore/ptr.rs:59
No locals.
#22 0x0000558a2c26a8a2 in core::ptr::drop_in_place::hf2a71eb873ce3d76 () at /checkout/src/libcore/ptr.rs:59
No locals.
#23 0x0000558a2c2637fe in _$LT$std..collections..hash..table..RawTable$LT$K$C$$u20$V$GT$$GT$::rev_drop_buckets::h9c1df0822f5c0f7a (self=0x7fec5d5c8620)
    at /checkout/src/libstd/collections/hash/table.rs:837
        elems_left = 0
        raw = {hash_start = 0x7fec622fba00, pair_start = 0x7fec622fbb00, idx = 7, _marker = {<No data fields>}}
#24 0x0000558a2c267ebf in _$LT$std..collections..hash..table..RawTable$LT$K$C$$u20$V$GT$$u20$as$u20$core..ops..drop..Drop$GT$::drop::ha559415df48328a4 (self=0x7fec5d5c8620)
    at /checkout/src/libstd/collections/hash/table.rs:1120
---Type <return> to continue, or q <return> to quit---
No locals.
#25 0x0000558a2c26870e in core::ptr::drop_in_place::h1499dfdb63bddca7 () at /checkout/src/libcore/ptr.rs:59
No locals.
#26 0x0000558a2c26a1e2 in core::ptr::drop_in_place::hc7bd72cd635a1367 () at /checkout/src/libcore/ptr.rs:59
No locals.
#27 0x0000558a2c26ea19 in _$LT$alloc..arc..Arc$LT$T$GT$$GT$::drop_slow::hc00b5a15d150e749 (self=0x7fec5f5fd0e0) at /checkout/src/liballoc/arc.rs:518
No locals.
#28 0x0000558a2c26f3a8 in _$LT$alloc..arc..Arc$LT$T$GT$$u20$as$u20$core..ops..drop..Drop$GT$::drop::h341dff866ebe6a05 (self=0x7fec5f5fd0e0) at /checkout/src/liballoc/arc.rs:970
No locals.
#29 0x0000558a2c269c8e in core::ptr::drop_in_place::h98299116f6f7f88f () at /checkout/src/libcore/ptr.rs:59
No locals.
#30 0x0000558a2c268d76 in core::ptr::drop_in_place::h3a9cf13d180fe1b2 () at /checkout/src/libcore/ptr.rs:59
No locals.
#31 0x0000558a2c29241d in grpcio::server::request_call::h450284c89871c0ee (ctx=..., cq=0x7fec5f5fd588)
    at /root/.cargo/git/checkouts/grpc-rs-d2d7508a79dd0c2c/3aab8fa/src/server.rs:416
No locals.
#32 0x0000558a2c27deca in grpcio::async::callback::Request::resolve::h3d3c1d403a5bec3e (self=..., cq=0x7fec5f5fd588, success=false)
    at /root/.cargo/git/checkouts/grpc-rs-d2d7508a79dd0c2c/3aab8fa/src/async/callback.rs:36
        rc = {server = {ptr = {pointer = {__0 = 0x7fec6230a580}}, phantom = {<No data fields>}}, registry = {ptr = {pointer = {__0 = 0x7fec5d5c8600}},
            phantom = {<No data fields>}}}
#33 0x0000558a2c272c9b in grpcio::async::CallTag::resolve::hb56eeda5e2ddbabe (self=..., cq=0x7fec5f5fd588, success=false)
    at /root/.cargo/git/checkouts/grpc-rs-d2d7508a79dd0c2c/3aab8fa/src/async/mod.rs:188
        cb = {ctx = {ctx = 0x7fec5d5de680, request_call = {RUST$ENCODED$ENUM$0$None = {__0 = {server = {ptr = {pointer = {__0 = 0x7fec6230a580}}, phantom = {<No data fields>}},
                  registry = {ptr = {pointer = {__0 = 0x7fec5d5c8600}}, phantom = {<No data fields>}}}}}}}
#34 0x0000558a2c2742a4 in grpcio::env::poll_queue::hdaacb53bf69da953 (cq=...) at /root/.cargo/git/checkouts/grpc-rs-d2d7508a79dd0c2c/3aab8fa/src/env.rs:38
        tag = 0x7fec5d5ddac0
        e = {event_type = OpComplete, success = 0, tag = 0x7fec5d5ddac0}
        cq = {handle = {ptr = {pointer = {__0 = 0x7fec6220d480}}, phantom = {<No data fields>}}, id = {__0 = 3}}
        id = {__0 = 3}
#35 0x0000558a2c274e7e in grpcio::env::EnvBuilder::build::_$u7b$$u7b$closure$u7d$$u7d$::hc7423c81655cab16 ()
    at /root/.cargo/git/checkouts/grpc-rs-d2d7508a79dd0c2c/3aab8fa/src/env.rs:89
        cq_ = {ptr = {pointer = {__0 = 0x7fec6220d480}}, phantom = {<No data fields>}}
#36 0x0000558a2c27d0a3 in std::sys_common::backtrace::__rust_begin_short_backtrace::h5892641247c36312 (f=...) at /checkout/src/libstd/sys_common/backtrace.rs:136
No locals.
#37 0x0000558a2c285cde in std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h34353941d6f6ecc3 () at /checkout/src/libstd/thread/mod.rs:409
        f = {__0 = {ptr = {pointer = {__0 = 0x7fec6220d480}}, phantom = {<No data fields>}}}
#38 0x0000558a2c2850e1 in _$LT$std..panic..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::hd2e8a88366f0d4bb (self=..., _args=0)
    at /checkout/src/libstd/panic.rs:308
No locals.
#39 0x0000558a2c285de5 in std::panicking::try::do_call::h11b29cde0103485a (data=0x7fec5f5fd728 "\200\324 b\354\177") at /checkout/src/libstd/panicking.rs:310
        f = {__0 = {__0 = {__0 = {ptr = {pointer = {__0 = 0x7fec6220d480}}, phantom = {<No data fields>}}}}}
        data = 0x7fec5f5fd728
#40 0x0000558a2c4618ba in __rust_maybe_catch_panic () at libpanic_unwind/lib.rs:105
No locals.
#41 0x0000558a2c285d23 in std::panicking::try::h23e2e79af118c046 (f=...) at /checkout/src/libstd/panicking.rs:289
        data = {f = {__0 = {__0 = {__0 = {ptr = {pointer = {__0 = 0x7fec6220d480}}, phantom = {<No data fields>}}}}}, r = 0}
        any_vtable = 0
        any_data = 0
#42 0x0000558a2c285393 in std::panic::catch_unwind::h22fc5f9cf7e98103 (f=...) at /checkout/src/libstd/panic.rs:392
No locals.
---Type <return> to continue, or q <return> to quit---
#43 0x0000558a2c285af8 in std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::h524a46ca26b5327b () at /checkout/src/libstd/thread/mod.rs:408
        their_thread = {inner = {ptr = {pointer = {__0 = 0x7fec622475d0}}, phantom = {<No data fields>}}}
        f = {__0 = {ptr = {pointer = {__0 = 0x7fec6220d480}}, phantom = {<No data fields>}}}
        their_packet = {ptr = {pointer = {__0 = 0x7fec62223930}}, phantom = {<No data fields>}}
#44 0x0000558a2c286687 in _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::h3ee5fd4ce6423e40 (self=0x7fec622ce0a0, args=0) at /checkout/src/liballoc/boxed.rs:640
No locals.
#45 0x0000558a2c4416ab in _$LT$alloc..boxed..Box$LT$alloc..boxed..FnBox$LT$A$C$$u20$Output$u3d$R$GT$$u20$$u2b$$u20$$u27$a$GT$$u20$as$u20$core..ops..function..FnOnce$LT$A$GT$$GT$::call_once::h75e539106a648d39 () at /checkout/src/liballoc/boxed.rs:650
No locals.
#46 std::sys_common::thread::start_thread::h88a639c99862a9f5 () at libstd/sys_common/thread.rs:24
No locals.
#47 0x0000558a2c4444e6 in std::sys::unix::thread::Thread::new::thread_start::h7d7a420a78cfa84d () at libstd/sys/unix/thread.rs:90
No locals.
#48 0x00007fec6383c6ba in start_thread (arg=0x7fec5f5fe700) at pthread_create.c:333
        __res = <optimized out>
        pd = 0x7fec5f5fe700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140653189129984, -8042882024657569378, 0, 140653241551711, 140653189130688, 140653241551968, 8050553593405192606,
                8050525658483472798}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#49 0x00007fec6335c41d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
No locals.

build failed with clang 11

/Users/tangliu/program/rust/rust-rocksdb/librocksdb_sys/libtitan_sys/../rocksdb/db/internal_stats.h:117:5: error: declaration shadows a variable in namespace 'rocksdb' [-Werror,-Wshadow]
    WRITE_WITH_WAL,
    ^
/Users/tangliu/program/rust/rust-rocksdb/librocksdb_sys/libtitan_sys/../rocksdb/include/rocksdb/statistics.h:198:3: note: previous declaration is here
  WRITE_WITH_WAL,       // Number of Write calls that request WAL
  ^
clang --version
Apple clang version 11.0.0 (clang-1100.0.33.8)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Merge result incorrect after database reopen

After a database is closed and reopened, the merges fail in some way.
Here's a sample repo: https://github.com/rgrochowicz/rust-rocksdb-merge-oddity

Notice that the read happens correctly if the key is read immediately after the merges, but fail after a reopen and the additional merges.

I'm expecting (50+50):

After first create: Ok(50) should be Ok(50)
After second create: Ok(100) should be Ok(100)

But receive (50+5?):

After first create: Ok(50) should be Ok(50)
After second create: Ok(55) should be Ok(100)

How to build it on windows?

I use cargo build,but it returns:
failed to run custom build command for librocksdb_sys v0.1.0 (file:///E:/rustproject/rust-rocksdb-master/librocksdb_sys).
so i want to know how to build rust-rocksdb on windows

Publish pingcap/rust-rocksdb to crates.io as TiRocks

To support community users of pingcap/rust-rocksdb, we would like to publish pingcap/rust-rocksdb to crates.io using the name "tirocks". We plan to use the same versioning as tikv, and have a roughly the same release schedule as tikv.

Use rocksdb SyncPoint to support fail-rs

To allow integration test frameworks to control rocksdb internals, we can make use of rocksdb SyncPoint to support rust fail-point https://github.com/tikv/fail-rs There are some difference between SyncPoint and fail-point. Some of the items to work on:

  • Make fail-point support dependencies (one fail-point wait for another before proceed)
  • Make SyncPoint support early return
  • Add rocksdb compile flag to enable SyncPoint in release build
  • Expose SyncPoint API on rocksdb side, then wrap it as fail-point API on rust-rocksdb side

use rocksdb 5.1.2

RocksDB 5.0.2 fixes a DeleteRange corruption, we should update for later DeleteRange use.

Auto-tuned Rate Limiter

whether the rust-rocksdb support auto tuned rate limiter which was mentioned in this paper last year?

it item seems has an obviously impact on read/write latencies.

should disable WITH_TESTS and WITH_TOOLS

I find we enable WITH_TESTS and WITH_TOOLS in the CMakeCache.txt.

//build with tests
WITH_TESTS:BOOL=ON

//build with tools
WITH_TOOLS:BOOL=ON

Although we don't compile them in fact, it may be better that we can disable them manually, in the build.rs:

        .define("WITH_SNAPPY", "ON")
        .define("WITH_TESTS", "OFF")
        .define("WITH_TOOLS", "OFF")
        .build_target("rocksdb")

AB test between RocksDB and Titan

Do random operations in the same order, and check if the content in Titan and in RocksDB are consistent.

Operations

  • Put
  • Delete
  • DeleteFilesInRanges
  • Ingest sst file
  • Get snapshot and release
  • Create Iterator and release

Step

  • Generate random operations
  • Apply to Titan and RocksDB
  • Check

reduce the redundant data copy for Get

The rocksdb_get API will first save data into a C++ string, then copy the string to a malloc buffer and return for outer use.

Maybe we can reduce the redundant copy. We may return a C structure which wraps the c++ string directly.

This may improve a little performance, but I still doubt whether it is worth to do or not.

test `test_block_based_options` failed sometimes

I found at #130

Test sometimes fails at this assertion .
I've added a message "TickerType::ReadAmpEstimateUsefulBytes is 0".

Running test on master branch by RUST_BACKTRACE=full cargo test -- --nocapture

output:

failures:

---- test_rocksdb_options::test_block_based_options stdout ----
	thread 'test_rocksdb_options::test_block_based_options' panicked at 'assertion failed: `(left != right)`
  left: `0`,
 right: `0`: TickerType::ReadAmpEstimateUsefulBytes is 0', tests/test_rocksdb_options.rs:589:4
stack backtrace:
   0:        0x1087c7883 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::h53146987acc82352
                               at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1:        0x1087c3eb0 - std::sys_common::backtrace::_print::h9fa78c974a2ee44c
                               at src/libstd/sys_common/backtrace.rs:71
   2:        0x1087ca863 - std::panicking::default_hook::{{closure}}::haef816838063b9ba
                               at src/libstd/sys_common/backtrace.rs:60
                               at src/libstd/panicking.rs:381
   3:        0x1087ca398 - std::panicking::default_hook::hcc910ee5a6164755
                               at src/libstd/panicking.rs:391
   4:        0x1087cad72 - std::panicking::begin_panic::hebc1b3c9e3ddd291
                               at src/libstd/panicking.rs:577
   5:        0x1087cabd4 - std::panicking::begin_panic::hd4fcfecbdb093b17
                               at src/libstd/panicking.rs:538
   6:        0x1087cab22 - std::panicking::try::do_call::h053be7a0e9f0fc06
                               at src/libstd/panicking.rs:522
   7:        0x1086c73ee - test::test_rocksdb_options::test_block_based_options::hca0c75cd42a2df8c
                               at tests/test_rocksdb_options.rs:589
   8:        0x10874d351 - <F as test::FnBox<T>>::call_box::hfa2ff38dcb4e05e3
                               at src/libtest/lib.rs:1480
                               at /Users/travis/build/rust-lang/rust/src/libcore/ops/function.rs:223
                               at src/libtest/lib.rs:141
   9:        0x1087d79dc - panic_unwind::dwarf::eh::read_encoded_pointer::h2d6187d22092e042
                               at src/libpanic_unwind/lib.rs:99
  10:        0x10873e388 - std::sys_common::backtrace::__rust_begin_short_backtrace::h3e768cfa9215c721
                               at /Users/travis/build/rust-lang/rust/src/libstd/panicking.rs:459
                               at /Users/travis/build/rust-lang/rust/src/libstd/panic.rs:361
                               at src/libtest/lib.rs:1419
                               at /Users/travis/build/rust-lang/rust/src/libstd/sys_common/backtrace.rs:136
  11:        0x10873f207 - std::panicking::try::do_call::hec1329aeb27eec8b
                               at /Users/travis/build/rust-lang/rust/src/libstd/thread/mod.rs:400
                               at /Users/travis/build/rust-lang/rust/src/libstd/panic.rs:296
                               at /Users/travis/build/rust-lang/rust/src/libstd/panicking.rs:480
  12:        0x1087d79dc - panic_unwind::dwarf::eh::read_encoded_pointer::h2d6187d22092e042
                               at src/libpanic_unwind/lib.rs:99
  13:        0x108747063 - <F as alloc::boxed::FnBox<A>>::call_box::hbaa0460cc6757097
                               at /Users/travis/build/rust-lang/rust/src/libstd/panicking.rs:459
                               at /Users/travis/build/rust-lang/rust/src/libstd/panic.rs:361
                               at /Users/travis/build/rust-lang/rust/src/libstd/thread/mod.rs:399
                               at /Users/travis/build/rust-lang/rust/src/liballoc/boxed.rs:728
  14:        0x1087c9dab - std::sys::imp::thread::Thread::new::thread_start::haf898c1a45f09126
                               at /Users/travis/build/rust-lang/rust/src/liballoc/boxed.rs:738
                               at src/libstd/sys_common/thread.rs:24
                               at src/libstd/sys/unix/thread.rs:90
  15:        0x10954293a - _pthread_body
  16:        0x109542886 - _pthread_start


failures:
    test_rocksdb_options::test_block_based_options

test result: FAILED. 73 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

macOS Sierra (10.12.6)

build failed

The machine is MacOs.

My dependency is
[dependencies.rocksdb] git = "https://github.com/pingcap/rust-rocksdb.git" package = "rocksdb" branch = "tikv-3.0"

My cmake version is
cmake version 3.15.5 CMake suite maintained and supported by Kitware (kitware.com/cmake).

My gcc version is
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple clang version 11.0.0 (clang-1100.0.33.8) Target: x86_64-apple-darwin19.0.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

When I run cargo build, it build failed, the stderr was showed below
--- stderr In file included from /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/titan/src/base_db_listener.cc:1: In file included from /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/titan/src/base_db_listener.h:3: In file included from /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/titan/src/db_impl.h:3: In file included from /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/../rocksdb/db/db_impl.h:23: In file included from /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/../rocksdb/db/compaction_job.h:24: /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/../rocksdb/db/internal_stats.h:111:5: error: declaration shadows a variable in namespace 'rocksdb' [-Werror,-Wshadow] WAL_FILE_BYTES, ^ /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/../rocksdb/include/rocksdb/statistics.h:191:3: note: previous declaration is here WAL_FILE_BYTES, // Number of bytes written to WAL ^ In file included from /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/titan/src/base_db_listener.cc:1: In file included from /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/titan/src/base_db_listener.h:3: In file included from /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/titan/src/db_impl.h:3: In file included from /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/../rocksdb/db/db_impl.h:23: In file included from /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/../rocksdb/db/compaction_job.h:24: /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/../rocksdb/db/internal_stats.h:112:5: error: declaration shadows a variable in namespace 'rocksdb' [-Werror,-Wshadow] WAL_FILE_SYNCED, ^ /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/../rocksdb/include/rocksdb/statistics.h:190:3: note: previous declaration is here WAL_FILE_SYNCED, // Number of times WAL sync is done ^ In file included from /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/titan/src/base_db_listener.cc:1: In file included from /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/titan/src/base_db_listener.h:3: In file included from /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/titan/src/db_impl.h:3: In file included from /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/../rocksdb/db/db_impl.h:23: In file included from /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/../rocksdb/db/compaction_job.h:24: /Users/kanner/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/81881c1/librocksdb_sys/libtitan_sys/../rocksdb/db/internal_stats.h:113:5: error: declaration shadows a variable in namespace 'rocksdb' [-Werror,-Wshadow] BYTES_WRITTEN,

How can I resolve it?

Test inference warning

warning: An explicit [[test]] section is specified in Cargo.toml which currently
disables Cargo from automatically inferring other test targets.
This inference behavior will change in the Rust 2018 edition and the following
files will be included as a test target:

  • /home/travis/build/pingcap/rust-rocksdb/tests/test_rate_limiter.rs
  • /home/travis/build/pingcap/rust-rocksdb/tests/test_delete_files_in_range.rs
  • /home/travis/build/pingcap/rust-rocksdb/tests/test_delete_range.rs
  • /home/travis/build/pingcap/rust-rocksdb/tests/test_compact_range.rs
  • /home/travis/build/pingcap/rust-rocksdb/tests/test_prefix_extractor.rs
  • /home/travis/build/pingcap/rust-rocksdb/tests/test_ingest_external_file.rs
  • /home/travis/build/pingcap/rust-rocksdb/tests/test_event_listener.rs
  • /home/travis/build/pingcap/rust-rocksdb/tests/test_slice_transform.rs
  • /home/travis/build/pingcap/rust-rocksdb/tests/test_ttl.rs
  • /home/travis/build/pingcap/rust-rocksdb/tests/test_iterator.rs
  • /home/travis/build/pingcap/rust-rocksdb/tests/test_column_family.rs
  • /home/travis/build/pingcap/rust-rocksdb/tests/test_rocksdb_options.rs
  • /home/travis/build/pingcap/rust-rocksdb/tests/test_multithreaded.rs
  • /home/travis/build/pingcap/rust-rocksdb/tests/test_read_only.rs
  • /home/travis/build/pingcap/rust-rocksdb/tests/test_statistics.rs
  • /home/travis/build/pingcap/rust-rocksdb/tests/test_table_properties.rs
  • /home/travis/build/pingcap/rust-rocksdb/tests/test_metadata.rs
  • /home/travis/build/pingcap/rust-rocksdb/tests/test_compaction_filter.rs

This is likely to break cargo build or cargo test as these files may not be
ready to be compiled as a test target today. You can future-proof yourself
and disable this warning by adding autotests = false to your [package]
section. You may also move the files to a location where Cargo would not
automatically infer them to be a target, such as in subfolders.
For more information on this warning you can consult
rust-lang/cargo#5330

Merge Operator while opening the DB in read only

I am currently trying to use a RocksDB with read only settings (DB::open_cf_for_read_only) but I am not able to get keys from it, the DB crash with the following message:

Invalid argument: merge_operator is not properly initialized.

Note that I have previously created the DB (DB::open) and created two column families in it (document and field) and I have setup a merge operator on one of the two column family (document) using:

let mut options = ColumnFamilyOptions::new();
options.add_merge_operator("concat_operator", concat_operator); // defined elsewhere

db.create_cf(ColumnFamilyDescriptor{ name: "document", options })?;
db.create_cf("field")?;

Once I have filled the DB my program quit and another one read it in read only, as I say above.
But I don't know how to setup a merge operator on a specific column family when I am not creating it.

let mut opts = DBOptions::default();
opts.create_if_missing(false);

let cfds = vec!["document", "field"];

let dbpath = dbpath.as_ref().to_str().unwrap();
let mut db = DB::open_cf_for_read_only(opts, dbpath, cfds, false)?;

{
    // This code block doesn't seems to do anything at all
    // the error is already here even with that

    let doc_handle = db.cf_handle("document").expect("'document' cf not found");
    let mut cf_opt = db.get_options_cf(&doc_handle);
    cf_opt.add_merge_operator("concat_operator", concat_operator);
}

// use `db` here...

Is the method just missing in this wrapper ? Do I miss something ?

Thank you for your help.

Add the delete_range interface

The DeleteRange method is added in RocksDB 5.0.1 experimental performance optimization for deleting very large ranges of contiguous keys. It should be added into this repo for performance profiling.

CI/TODO: Check each commit with sanitizer

Since this repo contains a lot of unsafe code, I suggest to check each commit with valgrind.

Note: valgrind shows some memory leaks / corruption on master branch, I will try to fix that later.

test_delete_files_in_range fails in different places

---- cases::test_delete_files_in_range::test_delete_files_in_ranges stdout ----
thread 'cases::test_delete_files_in_range::test_delete_files_in_ranges' panicked at 'assertion failed: !iter.valid()', tests/cases/test_delete_files_in_range.rs:204:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

---- cases::test_delete_files_in_range::test_delete_files_in_range_with_snap stdout ----
thread โ€˜cases::test_delete_files_in_range::test_delete_files_in_range_with_snapโ€™ panicked at โ€˜assertion failed: `(left == right)`
 left: `9`,
right: `6`โ€™, tests/cases/test_delete_files_in_range.rs:102:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

Fails to compile on fedora 28

% cat /etc/os-release 
NAME=Fedora
VERSION="28 (Twenty Eight)"
ID=fedora
VERSION_ID=28
PLATFORM_ID="platform:f28"
PRETTY_NAME="Fedora 28 (Twenty Eight)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:fedoraproject:fedora:28"
HOME_URL="https://fedoraproject.org/"
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=28
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=28
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
% gcc --version
gcc (GCC) 8.1.1 20180502 (Red Hat 8.1.1-1)
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Logs shows that:

/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/b011ecb/librocksdb_sys/rocksdb/memtable/inlineskiplist.h:281:11: error: โ€˜void* memcpy(void*, const void*, size_t)โ€™ writing to an object of type โ€˜struct std::atomic<rocksdb::InlineSkipList<const rocksdb::MemTableRep::KeyComparator&>::Node*>โ€™ with no trivial copy-assignment [-Werror=class-memaccess]
     memcpy(&next_[0], &height, sizeof(int));
     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Related issue: facebook/rocksdb#2705

compile error

when compile tikv branch master(6d60e7c)๏ผŒcompile error occurs:

--- stderr
/home/worker/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/1317e2e/librocksdb_sys/rocksdb/utilities/titandb/options.cc: In member function โ€˜std::string rocksdb::titandb::TitanCFOptions::ToString() constโ€™:
/home/worker/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/1317e2e/librocksdb_sys/rocksdb/utilities/titandb/options.cc:14:50: error: expected โ€˜)โ€™ before โ€˜PRIu64โ€™
snprintf(buf, sizeof(buf), "min_blob_size = %" PRIu64 "\n", min_blob_size);
...
/home/worker/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/1317e2e/librocksdb_sys/rocksdb/utilities/titandb/version_builder.cc: In member function โ€˜void rocksdb::titandb::VersionBuilder::Builder::AddFile(const std::shared_ptrrocksdb::titandb::BlobFileMeta&)โ€™:
/home/worker/.cargo/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/1317e2e/librocksdb_sys/rocksdb/utilities/titandb/version_builder.cc:14:35: error: expected โ€˜)โ€™ before โ€˜PRIu64โ€™
fprintf(stderr, "blob file %" PRIu64 " has been added before\n", number);

Then, I modify two files: librocksdb_sys/rocksdb/utilities/titandb/options.cc and librocksdb_sys/rocksdb/utilities/titandb/version_builder.cc, add Macro #define __STDC_FORMAT_MACROS before #include <inttypes.h>, it works.

Compile environment is below:

  • kernel: 3.10.0-693.1.1.el7.x86_64
  • linux: CentOS Linux release 7.2.1511 (Core)
  • gcc: gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)

can't compile with clang-10

๐Ÿ› Bug

error: failed to run custom build command for `libtitan_sys v0.0.1 (https://github.com/pingcap/rust-rocksdb.git?rev=3cd18c44d160a3cdba586d6502d51b7cc67efc59#3cd18c44)`

Caused by:
  process didn't exit successfully: `/src/libra/target/debug/build/libtitan_sys-0a473a4f134fb09e/build-script-build` (exit code: 101)
--- stdout
running: "cmake" "-Wdev" "--debug-output" "/rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan" "-DROCKSDB_DIR=/rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/../rocksdb" "-DWITH_TITAN_TESTS=OFF" "-DWITH_TITAN_TOOLS=OFF" "-DWITH_ZLIB=ON" "-DWITH_BZ2=ON" "-DWITH_LZ4=ON" "-DWITH_ZSTD=ON" "-DWITH_SNAPPY=ON" "-DWITH_TITAN_TESTS=OFF" "-DWITH_TITAN_TOOLS=OFF" "-DCMAKE_INSTALL_PREFIX=/src/libra/target/debug/build/libtitan_sys-48de1750a7ee3b75/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC --target=x86_64-unknown-linux-gnu -Wno-error=shadow -Wno-dev -Wno-error" "-DCMAKE_C_COMPILER=/usr/local/bin/clang" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC --target=x86_64-unknown-linux-gnu -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope -fsanitize=fuzzer-no-link -stdlib=libc++" "-DCMAKE_CXX_COMPILER=/usr/local/bin/clang++" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
Running with debug output on.
-- The C compiler identification is Clang 10.0.0
   Called from: [3]     /usr/share/cmake-3.5/Modules/CMakeDetermineCompilerId.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeDetermineCCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- The CXX compiler identification is Clang 10.0.0
   Called from: [3]     /usr/share/cmake-3.5/Modules/CMakeDetermineCompilerId.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeDetermineCXXCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Check for working C compiler: /usr/local/bin/clang
   Called from: [3]     /usr/share/cmake-3.5/Modules/CMakeTestCompilerCommon.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Check for working C compiler: /usr/local/bin/clang -- works
   Called from: [3]     /usr/share/cmake-3.5/Modules/CMakeTestCompilerCommon.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Detecting C compiler ABI info
   Called from: [3]     /usr/share/cmake-3.5/Modules/CMakeDetermineCompilerABI.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Detecting C compiler ABI info - done
   Called from: [3]     /usr/share/cmake-3.5/Modules/CMakeDetermineCompilerABI.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Detecting C compile features
   Called from: [3]     /usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Detecting C compile features - done
   Called from: [3]     /usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Check for working CXX compiler: /usr/local/bin/clang++
   Called from: [3]     /usr/share/cmake-3.5/Modules/CMakeTestCompilerCommon.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Check for working CXX compiler: /usr/local/bin/clang++ -- works
   Called from: [3]     /usr/share/cmake-3.5/Modules/CMakeTestCompilerCommon.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Detecting CXX compiler ABI info
   Called from: [3]     /usr/share/cmake-3.5/Modules/CMakeDetermineCompilerABI.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Detecting CXX compiler ABI info - done
   Called from: [3]     /usr/share/cmake-3.5/Modules/CMakeDetermineCompilerABI.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Detecting CXX compile features
   Called from: [3]     /usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Detecting CXX compile features - done
   Called from: [3]     /usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Found Git: /usr/bin/git (found version "2.7.4") 
   Called from: [4]     /usr/share/cmake-3.5/Modules/FindPackageMessage.cmake
                [3]     /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake
                [2]     /usr/share/cmake-3.5/Modules/FindGit.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Found snappy: /src/libra/target/debug/build/snappy-sys-6f23f73918cbe7fb/out/build/libsnappy.a  
   Called from: [5]     /usr/share/cmake-3.5/Modules/FindPackageMessage.cmake
                [4]     /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake
                [3]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/rocksdb/cmake/modules/Findsnappy.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Found bzip2: /src/libra/target/debug/build/bzip2-sys-301272982941b90c/out/lib/libbz2.a  
   Called from: [5]     /usr/share/cmake-3.5/Modules/FindPackageMessage.cmake
                [4]     /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake
                [3]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/rocksdb/cmake/modules/Findbzip2.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Found lz4: /src/libra/target/debug/build/lz4-sys-9e7fc2f86666e02c/out/liblz4.a  
   Called from: [5]     /usr/share/cmake-3.5/Modules/FindPackageMessage.cmake
                [4]     /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake
                [3]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/rocksdb/cmake/modules/Findlz4.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Found ZLIB: /src/libra/target/debug/build/libz-sys-ef064c149e00c895/out/build/libz.a (found version "1.2.11") 
   Called from: [5]     /usr/share/cmake-3.5/Modules/FindPackageMessage.cmake
                [4]     /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake
                [3]     /usr/share/cmake-3.5/Modules/FindZLIB.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Found zstd: /src/libra/target/debug/build/zstd-sys-41a5b9349914dcbb/out/libzstd.a  
   Called from: [5]     /usr/share/cmake-3.5/Modules/FindPackageMessage.cmake
                [4]     /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake
                [3]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/rocksdb/cmake/modules/Findzstd.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Performing Test HAVE_SSE42
   Called from: [3]     /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Performing Test HAVE_SSE42 - Success
   Called from: [3]     /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Performing Test HAVE_THREAD_LOCAL
   Called from: [3]     /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Performing Test HAVE_THREAD_LOCAL - Success
   Called from: [3]     /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Enabling RTTI in Debug builds only (default)
   Called from: [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Performing Test HAVE_FALLOCATE
   Called from: [3]     /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Performing Test HAVE_FALLOCATE - Success
   Called from: [3]     /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Performing Test HAVE_SYNC_FILE_RANGE_WRITE
   Called from: [3]     /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Performing Test HAVE_SYNC_FILE_RANGE_WRITE - Success
   Called from: [3]     /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Performing Test HAVE_PTHREAD_MUTEX_ADAPTIVE_NP
   Called from: [3]     /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Performing Test HAVE_PTHREAD_MUTEX_ADAPTIVE_NP - Success
   Called from: [3]     /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Looking for malloc_usable_size
   Called from: [4]     /usr/share/cmake-3.5/Modules/CheckSymbolExists.cmake
                [3]     /usr/share/cmake-3.5/Modules/CheckCXXSymbolExists.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Looking for malloc_usable_size - found
   Called from: [4]     /usr/share/cmake-3.5/Modules/CheckSymbolExists.cmake
                [3]     /usr/share/cmake-3.5/Modules/CheckCXXSymbolExists.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Looking for sched_getcpu
   Called from: [4]     /usr/share/cmake-3.5/Modules/CheckSymbolExists.cmake
                [3]     /usr/share/cmake-3.5/Modules/CheckCXXSymbolExists.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Looking for sched_getcpu - found
   Called from: [4]     /usr/share/cmake-3.5/Modules/CheckSymbolExists.cmake
                [3]     /usr/share/cmake-3.5/Modules/CheckCXXSymbolExists.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
-- Configuring done

and later:

--- stderr
CMake Warning (dev) at /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:47 (try_compile):
  Policy CMP0056 is not set: Honor link flags in try_compile() source-file
  signature.  Run "cmake --help-policy CMP0056" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, try_compile is not honoring
  caller link flags (e.g.  CMAKE_EXE_LINKER_FLAGS) in the test project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)
This warning is for project developers.  Use -Wno-dev to suppress it.

   Called from: [2]     /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
CMake Warning (dev) at /usr/share/cmake-3.5/Modules/CMakeDetermineCompilerABI.cmake:36 (try_compile):
  Policy CMP0056 is not set: Honor link flags in try_compile() source-file
  signature.  Run "cmake --help-policy CMP0056" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, try_compile is not honoring
  caller link flags (e.g.  CMAKE_EXE_LINKER_FLAGS) in the test project.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:75 (CMAKE_DETERMINE_COMPILER_ABI)
  CMakeLists.txt:2 (project)
This warning is for project developers.  Use -Wno-dev to suppress it.

   Called from: [3]     /usr/share/cmake-3.5/Modules/CMakeDetermineCompilerABI.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
CMake Warning (dev) at /usr/share/cmake-3.5/Modules/Internal/FeatureTesting.cmake:25 (try_compile):
  Policy CMP0056 is not set: Honor link flags in try_compile() source-file
  signature.  Run "cmake --help-policy CMP0056" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, try_compile is not honoring
  caller link flags (e.g.  CMAKE_EXE_LINKER_FLAGS) in the test project.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/Compiler/Clang-C.cmake:38 (record_compiler_features)
  /usr/share/cmake-3.5/Modules/Compiler/Clang-C.cmake:43 (_get_clang_features)
  /usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake:26 (cmake_record_c_compile_features)
  /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:78 (CMAKE_DETERMINE_COMPILE_FEATURES)
  CMakeLists.txt:2 (project)
This warning is for project developers.  Use -Wno-dev to suppress it.

   Called from: [6]     /usr/share/cmake-3.5/Modules/Internal/FeatureTesting.cmake
                [5]     /usr/share/cmake-3.5/Modules/Compiler/Clang-C.cmake
                [4]     /usr/share/cmake-3.5/Modules/Compiler/Clang-C.cmake
                [3]     /usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
CMake Warning (dev) at /usr/share/cmake-3.5/Modules/Internal/FeatureTesting.cmake:25 (try_compile):
  Policy CMP0056 is not set: Honor link flags in try_compile() source-file
  signature.  Run "cmake --help-policy CMP0056" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, try_compile is not honoring
  caller link flags (e.g.  CMAKE_EXE_LINKER_FLAGS) in the test project.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/Compiler/Clang-C.cmake:38 (record_compiler_features)
  /usr/share/cmake-3.5/Modules/Compiler/Clang-C.cmake:45 (_get_clang_features)
  /usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake:26 (cmake_record_c_compile_features)
  /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:78 (CMAKE_DETERMINE_COMPILE_FEATURES)
  CMakeLists.txt:2 (project)
This warning is for project developers.  Use -Wno-dev to suppress it.

   Called from: [6]     /usr/share/cmake-3.5/Modules/Internal/FeatureTesting.cmake
                [5]     /usr/share/cmake-3.5/Modules/Compiler/Clang-C.cmake
                [4]     /usr/share/cmake-3.5/Modules/Compiler/Clang-C.cmake
                [3]     /usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
CMake Warning (dev) at /usr/share/cmake-3.5/Modules/Internal/FeatureTesting.cmake:25 (try_compile):
  Policy CMP0056 is not set: Honor link flags in try_compile() source-file
  signature.  Run "cmake --help-policy CMP0056" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, try_compile is not honoring
  caller link flags (e.g.  CMAKE_EXE_LINKER_FLAGS) in the test project.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/Compiler/Clang-C.cmake:38 (record_compiler_features)
  /usr/share/cmake-3.5/Modules/Compiler/Clang-C.cmake:48 (_get_clang_features)
  /usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake:26 (cmake_record_c_compile_features)
  /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:78 (CMAKE_DETERMINE_COMPILE_FEATURES)
  CMakeLists.txt:2 (project)
This warning is for project developers.  Use -Wno-dev to suppress it.

   Called from: [6]     /usr/share/cmake-3.5/Modules/Internal/FeatureTesting.cmake
                [5]     /usr/share/cmake-3.5/Modules/Compiler/Clang-C.cmake
                [4]     /usr/share/cmake-3.5/Modules/Compiler/Clang-C.cmake
                [3]     /usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
CMake Warning (dev) at /usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake:40 (try_compile):
  Policy CMP0056 is not set: Honor link flags in try_compile() source-file
  signature.  Run "cmake --help-policy CMP0056" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, try_compile is not honoring
  caller link flags (e.g.  CMAKE_EXE_LINKER_FLAGS) in the test project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)
This warning is for project developers.  Use -Wno-dev to suppress it.

   Called from: [2]     /usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
CMake Warning (dev) at /usr/share/cmake-3.5/Modules/CMakeDetermineCompilerABI.cmake:36 (try_compile):
  Policy CMP0056 is not set: Honor link flags in try_compile() source-file
  signature.  Run "cmake --help-policy CMP0056" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, try_compile is not honoring
  caller link flags (e.g.  CMAKE_EXE_LINKER_FLAGS) in the test project.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake:68 (CMAKE_DETERMINE_COMPILER_ABI)
  CMakeLists.txt:2 (project)
This warning is for project developers.  Use -Wno-dev to suppress it.

   Called from: [3]     /usr/share/cmake-3.5/Modules/CMakeDetermineCompilerABI.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
CMake Warning (dev) at /usr/share/cmake-3.5/Modules/Internal/FeatureTesting.cmake:25 (try_compile):
  Policy CMP0056 is not set: Honor link flags in try_compile() source-file
  signature.  Run "cmake --help-policy CMP0056" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, try_compile is not honoring
  caller link flags (e.g.  CMAKE_EXE_LINKER_FLAGS) in the test project.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/Compiler/Clang-CXX.cmake:48 (record_compiler_features)
  /usr/share/cmake-3.5/Modules/Compiler/Clang-CXX.cmake:53 (_get_clang_features)
  /usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake:64 (cmake_record_cxx_compile_features)
  /usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake:71 (CMAKE_DETERMINE_COMPILE_FEATURES)
  CMakeLists.txt:2 (project)
This warning is for project developers.  Use -Wno-dev to suppress it.

   Called from: [6]     /usr/share/cmake-3.5/Modules/Internal/FeatureTesting.cmake
                [5]     /usr/share/cmake-3.5/Modules/Compiler/Clang-CXX.cmake
                [4]     /usr/share/cmake-3.5/Modules/Compiler/Clang-CXX.cmake
                [3]     /usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
CMake Warning (dev) at /usr/share/cmake-3.5/Modules/Internal/FeatureTesting.cmake:25 (try_compile):
  Policy CMP0056 is not set: Honor link flags in try_compile() source-file
  signature.  Run "cmake --help-policy CMP0056" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, try_compile is not honoring
  caller link flags (e.g.  CMAKE_EXE_LINKER_FLAGS) in the test project.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/Compiler/Clang-CXX.cmake:48 (record_compiler_features)
  /usr/share/cmake-3.5/Modules/Compiler/Clang-CXX.cmake:55 (_get_clang_features)
  /usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake:64 (cmake_record_cxx_compile_features)
  /usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake:71 (CMAKE_DETERMINE_COMPILE_FEATURES)
  CMakeLists.txt:2 (project)
This warning is for project developers.  Use -Wno-dev to suppress it.

   Called from: [6]     /usr/share/cmake-3.5/Modules/Internal/FeatureTesting.cmake
                [5]     /usr/share/cmake-3.5/Modules/Compiler/Clang-CXX.cmake
                [4]     /usr/share/cmake-3.5/Modules/Compiler/Clang-CXX.cmake
                [3]     /usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
CMake Warning (dev) at /usr/share/cmake-3.5/Modules/Internal/FeatureTesting.cmake:25 (try_compile):
  Policy CMP0056 is not set: Honor link flags in try_compile() source-file
  signature.  Run "cmake --help-policy CMP0056" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, try_compile is not honoring
  caller link flags (e.g.  CMAKE_EXE_LINKER_FLAGS) in the test project.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/Compiler/Clang-CXX.cmake:48 (record_compiler_features)
  /usr/share/cmake-3.5/Modules/Compiler/Clang-CXX.cmake:58 (_get_clang_features)
  /usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake:64 (cmake_record_cxx_compile_features)
  /usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake:71 (CMAKE_DETERMINE_COMPILE_FEATURES)
  CMakeLists.txt:2 (project)
This warning is for project developers.  Use -Wno-dev to suppress it.

   Called from: [6]     /usr/share/cmake-3.5/Modules/Internal/FeatureTesting.cmake
                [5]     /usr/share/cmake-3.5/Modules/Compiler/Clang-CXX.cmake
                [4]     /usr/share/cmake-3.5/Modules/Compiler/Clang-CXX.cmake
                [3]     /usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake
                [2]     /usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
CMake Warning (dev) at /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake:76 (try_compile):
  Policy CMP0056 is not set: Honor link flags in try_compile() source-file
  signature.  Run "cmake --help-policy CMP0056" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, try_compile is not honoring
  caller link flags (e.g.  CMAKE_EXE_LINKER_FLAGS) in the test project.
Call Stack (most recent call first):
  cmake/rocksdb_flags.cmake:110 (CHECK_CXX_SOURCE_COMPILES)
  CMakeLists.txt:31 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

   Called from: [3]     /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
CMake Warning (dev) at /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake:76 (try_compile):
  Policy CMP0056 is not set: Honor link flags in try_compile() source-file
  signature.  Run "cmake --help-policy CMP0056" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, try_compile is not honoring
  caller link flags (e.g.  CMAKE_EXE_LINKER_FLAGS) in the test project.
Call Stack (most recent call first):
  cmake/rocksdb_flags.cmake:130 (CHECK_CXX_SOURCE_COMPILES)
  CMakeLists.txt:31 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

   Called from: [3]     /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
CMake Warning (dev) at /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake:76 (try_compile):
  Policy CMP0056 is not set: Honor link flags in try_compile() source-file
  signature.  Run "cmake --help-policy CMP0056" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, try_compile is not honoring
  caller link flags (e.g.  CMAKE_EXE_LINKER_FLAGS) in the test project.
Call Stack (most recent call first):
  cmake/rocksdb_flags.cmake:287 (CHECK_CXX_SOURCE_COMPILES)
  CMakeLists.txt:31 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

   Called from: [3]     /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
CMake Warning (dev) at /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake:76 (try_compile):
  Policy CMP0056 is not set: Honor link flags in try_compile() source-file
  signature.  Run "cmake --help-policy CMP0056" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, try_compile is not honoring
  caller link flags (e.g.  CMAKE_EXE_LINKER_FLAGS) in the test project.
Call Stack (most recent call first):
  cmake/rocksdb_flags.cmake:300 (CHECK_CXX_SOURCE_COMPILES)
  CMakeLists.txt:31 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

   Called from: [3]     /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
CMake Warning (dev) at /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake:76 (try_compile):
  Policy CMP0056 is not set: Honor link flags in try_compile() source-file
  signature.  Run "cmake --help-policy CMP0056" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, try_compile is not honoring
  caller link flags (e.g.  CMAKE_EXE_LINKER_FLAGS) in the test project.
Call Stack (most recent call first):
  cmake/rocksdb_flags.cmake:311 (CHECK_CXX_SOURCE_COMPILES)
  CMakeLists.txt:31 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

   Called from: [3]     /usr/share/cmake-3.5/Modules/CheckCXXSourceCompiles.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
CMake Warning (dev) at /usr/share/cmake-3.5/Modules/CheckSymbolExists.cmake:86 (try_compile):
  Policy CMP0056 is not set: Honor link flags in try_compile() source-file
  signature.  Run "cmake --help-policy CMP0056" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, try_compile is not honoring
  caller link flags (e.g.  CMAKE_EXE_LINKER_FLAGS) in the test project.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/CheckCXXSymbolExists.cmake:48 (_CHECK_SYMBOL_EXISTS)
  cmake/rocksdb_flags.cmake:322 (check_cxx_symbol_exists)
  CMakeLists.txt:31 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

   Called from: [4]     /usr/share/cmake-3.5/Modules/CheckSymbolExists.cmake
                [3]     /usr/share/cmake-3.5/Modules/CheckCXXSymbolExists.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
CMake Warning (dev) at /usr/share/cmake-3.5/Modules/CheckSymbolExists.cmake:86 (try_compile):
  Policy CMP0056 is not set: Honor link flags in try_compile() source-file
  signature.  Run "cmake --help-policy CMP0056" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, try_compile is not honoring
  caller link flags (e.g.  CMAKE_EXE_LINKER_FLAGS) in the test project.
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/CheckCXXSymbolExists.cmake:48 (_CHECK_SYMBOL_EXISTS)
  cmake/rocksdb_flags.cmake:327 (check_cxx_symbol_exists)
  CMakeLists.txt:31 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

   Called from: [4]     /usr/share/cmake-3.5/Modules/CheckSymbolExists.cmake
                [3]     /usr/share/cmake-3.5/Modules/CheckCXXSymbolExists.cmake
                [2]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/cmake/rocksdb_flags.cmake
                [1]     /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/CMakeLists.txt
In file included from /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/src/table_builder.cc:1:
In file included from /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/src/table_builder.h:5:
In file included from /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/src/blob_file_set.h:9:
In file included from /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/src/blob_storage.h:8:
In file included from /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/titan/src/blob_gc.h:6:
In file included from /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/../rocksdb/db/column_family.h:18:
In file included from /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/../rocksdb/db/table_cache.h:25:
In file included from /rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/../rocksdb/table/table_reader.h:14:
/rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/../rocksdb/table/get_context.h:91:3: error: explicitly defaulted default constructor is implicitly deleted [-Werror,-Wdefaulted-function-deleted]
  GetContext() = default;
  ^
/rust/git/checkouts/rust-rocksdb-82ef6e5337b3fbe6/3cd18c4/librocksdb_sys/libtitan_sys/../rocksdb/table/get_context.h:168:18: note: default constructor of 'GetContext' is implicitly deleted because field 'tracing_get_id_' of const-qualified type 'const uint64_t' (aka 'const unsigned long') would not be initialized
  const uint64_t tracing_get_id_;
                 ^
1 error generated.
make[3]: *** [CMakeFiles/titan.dir/src/table_builder.cc.o] Error 1
make[2]: *** [CMakeFiles/titan.dir/all] Error 2
make[1]: *** [CMakeFiles/titan.dir/rule] Error 2
make: *** [titan] Error 2

perf context test failure

run cargo test on mac os, two asserts in src/perf_context.rs failed:
assert_eq!(ctx.seek_internal_seek_time(), 0); L431
assert_eq!(get_perf_level(), PerfLevel::EnableCount); L437

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.