Squashed 'librocksdb-sys/rocksdb/' changes from 62d62a9d1..2776c764d

2776c764d copying key when received
85d59d7c7 randomize only the IV part of prefix

git-subtree-dir: librocksdb-sys/rocksdb
git-subtree-split: 2776c764d099304c656a4515ee4d4383fb2b12b1
master
Niko PLP 1 year ago
parent 3fc956b78a
commit c51f1bcffb
  1. 0
      .circleci/config.yml
  2. 0
      .circleci/ubsan_suppression_list.txt
  3. 0
      .clang-format
  4. 109
      .github/workflows/rust.yml
  5. 0
      .github/workflows/sanity_check.yml
  6. 104
      .gitignore
  7. 0
      .lgtm.yml
  8. 0
      .watchmanconfig
  9. 0
      AUTHORS
  10. 416
      CHANGELOG.md
  11. 0
      CMakeLists.txt
  12. 0
      CODE_OF_CONDUCT.md
  13. 55
      CONTRIBUTING.md
  14. 0
      COPYING
  15. 47
      Cargo.toml
  16. 0
      DEFAULT_OPTIONS_HISTORY.md
  17. 0
      DUMP_FORMAT.md
  18. 0
      HISTORY.md
  19. 0
      INSTALL.md
  20. 0
      LANGUAGE-BINDINGS.md
  21. 202
      LICENSE
  22. 0
      LICENSE.Apache
  23. 0
      LICENSE.leveldb
  24. 43
      MAINTAINERSHIP.md
  25. 0
      Makefile
  26. 0
      PLUGINS.md
  27. 72
      README.md
  28. 0
      TARGETS
  29. 0
      USERS.md
  30. 0
      Vagrantfile
  31. 0
      WINDOWS_PORT.md
  32. 0
      buckifier/bench-slow.json
  33. 0
      buckifier/bench.json
  34. 0
      buckifier/buckify_rocksdb.py
  35. 0
      buckifier/check_buck_targets.sh
  36. 0
      buckifier/rocks_test_runner.sh
  37. 0
      buckifier/targets_builder.py
  38. 0
      buckifier/targets_cfg.py
  39. 0
      buckifier/util.py
  40. 0
      build_tools/amalgamate.py
  41. 0
      build_tools/benchmark_log_tool.py
  42. 0
      build_tools/build_detect_platform
  43. 0
      build_tools/check-sources.sh
  44. 0
      build_tools/dependencies_platform010.sh
  45. 0
      build_tools/dockerbuild.sh
  46. 0
      build_tools/error_filter.py
  47. 0
      build_tools/fb_compile_mongo.sh
  48. 0
      build_tools/fbcode_config.sh
  49. 0
      build_tools/fbcode_config_platform010.sh
  50. 0
      build_tools/format-diff.sh
  51. 0
      build_tools/gnu_parallel
  52. 0
      build_tools/make_package.sh
  53. 0
      build_tools/ps_with_stack
  54. 0
      build_tools/regression_build_test.sh
  55. 0
      build_tools/run_ci_db_test.ps1
  56. 0
      build_tools/setup_centos7.sh
  57. 0
      build_tools/ubuntu20_image/Dockerfile
  58. 0
      build_tools/update_dependencies.sh
  59. 0
      build_tools/version.sh
  60. 0
      cache/cache.cc
  61. 0
      cache/cache_bench.cc
  62. 0
      cache/cache_bench_tool.cc
  63. 0
      cache/cache_entry_roles.cc
  64. 0
      cache/cache_entry_roles.h
  65. 0
      cache/cache_entry_stats.h
  66. 0
      cache/cache_helpers.cc
  67. 0
      cache/cache_helpers.h
  68. 0
      cache/cache_key.cc
  69. 0
      cache/cache_key.h
  70. 0
      cache/cache_reservation_manager.cc
  71. 0
      cache/cache_reservation_manager.h
  72. 0
      cache/cache_reservation_manager_test.cc
  73. 0
      cache/cache_test.cc
  74. 0
      cache/charged_cache.cc
  75. 0
      cache/charged_cache.h
  76. 0
      cache/clock_cache.cc
  77. 0
      cache/clock_cache.h
  78. 0
      cache/compressed_secondary_cache.cc
  79. 0
      cache/compressed_secondary_cache.h
  80. 0
      cache/compressed_secondary_cache_test.cc
  81. 0
      cache/lru_cache.cc
  82. 0
      cache/lru_cache.h
  83. 0
      cache/lru_cache_test.cc
  84. 0
      cache/secondary_cache.cc
  85. 0
      cache/secondary_cache_adapter.cc
  86. 0
      cache/secondary_cache_adapter.h
  87. 0
      cache/sharded_cache.cc
  88. 0
      cache/sharded_cache.h
  89. 0
      cache/typed_cache.h
  90. 0
      cmake/RocksDBConfig.cmake.in
  91. 0
      cmake/modules/CxxFlags.cmake
  92. 0
      cmake/modules/FindJeMalloc.cmake
  93. 0
      cmake/modules/FindNUMA.cmake
  94. 0
      cmake/modules/FindSnappy.cmake
  95. 0
      cmake/modules/FindTBB.cmake
  96. 0
      cmake/modules/Findgflags.cmake
  97. 0
      cmake/modules/Findlz4.cmake
  98. 0
      cmake/modules/Finduring.cmake
  99. 0
      cmake/modules/Findzstd.cmake
  100. 0
      cmake/modules/ReadVersion.cmake
  101. Some files were not shown because too many files have changed in this diff Show More

@ -1,109 +0,0 @@
name: RocksDB CI
on: [push, pull_request]
env:
RUST_VERSION: 1.60.0
jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_VERSION }}
components: rustfmt
profile: minimal
override: true
- name: Run rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
doc-check:
name: Rustdoc-check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_VERSION }}
components: rust-docs
profile: minimal
override: true
- name: Run cargo rustdoc
uses: actions-rs/cargo@v1
with:
command: rustdoc
args: -- -D warnings
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_VERSION }}
components: clippy
profile: minimal
override: true
- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets -- -D warnings
audit:
name: Security audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
test:
name: ${{ matrix.build }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [Linux, macOS, Windows]
include:
- build: Linux
os: ubuntu-latest
- build: macOS
os: macos-latest
- build: Windows
os: windows-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_VERSION }}
target: ${{ matrix.target }}
profile: minimal
override: true
- name: Remove msys64 # Workaround to resolve link error with C:\msys64\mingw64\bin\libclang.dll
if: runner.os == 'Windows'
run: Remove-Item -LiteralPath "C:\msys64\" -Force -Recurse
- name: Install dependencies
if: runner.os == 'Windows'
run: choco install llvm -y
- name: Run rocksdb tests
run: |
cargo test --all
cargo test --all --features multi-threaded-cf
- name: Run rocksdb tests (jemalloc)
if: runner.os != 'Windows'
run: cargo test --all --features jemalloc

104
.gitignore vendored

@ -1,11 +1,99 @@
*.swo make_config.mk
target rocksdb.pc
Cargo.lock
*.orig *.a
*.bk *.arc
*rlib *.d
*.dylib*
*.gcda
*.gcno
*.o
*.o.tmp
*.so
*.so.*
*_test
*_bench
*_stress
*.out
*.class
*.jar
*.*jnilib*
*.d-e
*.o-*
*.swp
*~
*.vcxproj
*.vcxproj.filters
*.sln
*.cmake
.watchmanconfig
CMakeCache.txt
CMakeFiles/
build/
ldb
manifest_dump
sst_dump
blob_dump
block_cache_trace_analyzer
tools/block_cache_analyzer/*.pyc
column_aware_encoding_exp
util/build_version.cc
build_tools/VALGRIND_LOGS/
coverage/COVERAGE_REPORT
.gdbhistory
.gdb_history
package/
unity.a
tags tags
path etags
rocksdb_dump
rocksdb_undump
db_test2
trace_analyzer
block_cache_trace_analyzer
io_tracer_parser
.DS_Store .DS_Store
.idea .vs
.vscode .vscode
.clangd
java/out
java/target
java/test-libs
java/*.log
java/include/org_rocksdb_*.h
.idea/
*.iml
rocksdb.cc
rocksdb.h
unity.cc
java/crossbuild/.vagrant
.vagrant/
java/**/*.asc
java/javadoc
scan_build_report/
t
LOG
db_logs/
tp2/
fbcode/
fbcode
buckifier/*.pyc
buckifier/__pycache__
compile_commands.json
clang-format-diff.py
.py3/
fuzz/proto/gen/
fuzz/crash-*
cmake-build-*
third-party/folly/
.cache
*.sublime-*

@ -1,416 +0,0 @@
# Changelog
## [Unreleased]
## 0.21.0 (2023-05-09)
* Add doc-check to CI with fix warnings in docs (YuraKotov)
* Fix rustdoc::broken-intra-doc-links errors (YuraKotov)
* Fix 32-bit ARM build (EyeOfPython)
* Allow specifying checksum type (romanz)
* Enable librocksdb-sys to be built by rustc_codegen_cranelift (ZePedroResende)
* Update to RocksDB 8.0.0 (niklasf)
* Block cache creation failure is not recoverable (niklasf)
* Update iOS min version to 12 in the build script (mighty840)
* Actually enable `io-uring` (niklasf)
* Update to RocksDB 8.1.1 (niklasf)
* Add `Cache::new_hyper_clock_cache()` (niklasf)
* Retrieve Value from KeyMayExist if value found in Cache or Memory (Congyuwang)
* Support for comparators as closures (pegesund)
* Fix bug in DBWALIterator that would miss updates (Zagitta)
## 0.20.1 (2023-02-10)
* Fix supporting MSRV 1.60.0 (aleksuss)
## 0.20.0 (2023-02-09)
* Support RocksDB 7.x `BackupEngineOptions` (exabytes18)
* Fix `int128` compatibility check (Dirreke)
* Add `Options::load_latest` method to load the latest options from RockDB (Congyuwang)
* Bump bindgen to 0.64.0 (cwlittle)
* Bump rocksdb to 7.9.2 (kwek20)
* Make `set_snapshot` method public (a14e)
* Add `drop_cf` function to `TransactionDB` (bothra90)
* Bump rocksdb to 7.8.3 (aleksuss)
* Add doc for `set_cache_index_and_filter_blocks` (guerinoni)
* Re-run `build.rs` if env vars change (drahnr)
* Add `WriteBatch::data` method (w41ter)
* Add `DB::open_cf_with_opts` method (w41ter)
* Use lz4-sys crate rather then submodule (niklasf)
* Make create_new_backup_flush generic (minshao)
## 0.19.0 (2022-08-05)
* Add support for building with `io_uring` on Linux (parazyd)
* Change iterators to return Result (mina86)
* Support RocksDB transaction (yiyuanliu)
* Avoid pulling in dependencies via static feature flag (niklasf)
* Bump `rocksdb` to 7.4.4 (niklasf)
* Bump `tikv-jemalloc-sys` to 0.5 (niklasf)
* Update `set_use_fsync` comment (nazar-pc)
* Introduce ReadOptions::set_iterate_range and PrefixRange (mina86)
* Bump `rocksdb` to 7.4.3 (aleksuss)
* Don’t hold onto ReadOptions.inner when iterating (mina86)
* Bump `zstd-sys` from 1.6 to 2.0 (slightknack)
* Enable a building on the iOS platform (dignifiedquire)
* Add DBRawIteratorWithThreadMode::item method (mina86)
* Use NonNull in DBRawIteratorWithThreadMode (mina86)
* Tiny refactoring including fix for UB (niklasf)
* Add batched version MultiGet API (yhchiang-sol)
* Upgrade to rocksdb v7.3.1 (yhchiang-sol)
* Consistently use `ffi_util::to_cpath` to convert `Path` to `CString` (mina86)
* Convert properties to `&CStr` (mina86)
* Allow passing `&CStr` arguments (mina86)
* Fix memory leak when reading properties and avoid memory allocation (mina86)
* Fix Windows UTF-8 build flag (rajivshah3)
* Use more target features to build librocksdb-sys (niklasf)
* Fix `bz_internal_error` symbol multiply defined (nanpuyue)
* Bump rocksdb to 7.1.2 (dignifiedquire)
* Add BlobDB options (dignifiedquire)
* Add snapshot `PinnableSlice` based API (zheland)
## 0.18.0 (2022-02-03)
* Add open_cf_descriptor methods for Secondary and ReadOnly AccessType (steviez)
* Make Ribbon filters available (niklasf)
* Change versioning scheme of `librocksdb-sys` crate (aleksuss)
* Upgrade to RocksDB 6.28.2 (akrylysov)
* Fix theoretical UB while transmuting Arc (niklasf)
* Support configuring bottom-most compression level (mina86)
* Add BlockBasedOptions::set_whole_key_filtering (niklasf)
* Add constants for all supported properties (steviez)
* Make CacheWrapper and EnvWrapper Send and Sync (aleksuss)
* Replace mem::transmute with narrower conversions (niklasf)
* Optimize non-overlapping copy in raw_data (niklasf)
* Support multi_get_* methods (olegnn)
* Optimize multi_get_cf_opt() to use size hint (niklasf)
* Fix typo in set_background_purge_on_iterator_cleanup method (Congyuwang)
* Use external compression crates where possible (Dr-Emann)
* Update compression dependencies (akrylysov)
* Add method for opening DB with ro access and cf descriptors (nikurt)
* Support restoring from a specified backup (GoldenLeaves)
* Add merge operands iterator (0xdeafbeef)
* Derive serde::{Serialize, Deserialize} for configuration enums (thibault-martinez)
* Add feature flag for runtime type information and metadata (jgraettinger)
* Add set_info_log_level to control log verbosity (tkintscher)
* Replace jemalloc-sys for tikv-jemalloc-sys (Rexagon)
* Support UTF-8 file paths on Windows (rajivshah3)
* Support building RocksDB with jemalloc (akrylysov)
* Add rocksdb WAL flush api (duarten)
* Update rocksdb to v6.22.1 (duarten)
## 0.17.0 (2021-07-22)
* Fix `multi_get` method (mikhailOK)
* Bump `librocksdb-sys` up to 6.19.3 (olegnn)
* Add support for the cuckoo table format (rbost)
* RocksDB is not compiled with SSE4 instructions anymore unless the corresponding features are enabled in rustc (mbargull)
* Bump `librocksdb-sys` up to 6.20.3 (olegnn, akrylysov)
* Add `DB::key_may_exist_cf_opt` method (stanislav-tkach)
* Add `Options::set_zstd_max_train_bytes` method (stanislav-tkach)
* Mark Cache and Env as Send and Sync (akrylysov)
* Allow cloning the Cache and Env (duarten)
* Make SSE inclusion conditional for target features (mbargull)
* Use Self where possible (adamnemecek)
* Don't leak dropped column families (ryoqun)
## 0.16.0 (2021-04-18)
* Add `DB::cancel_all_background_work` method (stanislav-tkach)
* Bump `librocksdb-sys` up to 6.13.3 (aleksuss)
* Add `multi_get`, `multi_get_opt`, `multi_get_cf` and `multi_get_cf_opt` `DB` methods (stanislav-tkach)
* Allow setting options on a ColumnFamily (romanz)
* Fix logic related to merge operator settings (BoOTheFurious)
* Export persist_period_sec option and background_threads (developerfred)
* Remove unneeded bindgen features (Kixunil)
* Add merge delete_callback omitted by mistake (zhangsoledad)
* Bump `librocksdb-sys` up to 6.17.3 (ordian)
* Remove the need for `&mut self` in `create_cf` and `drop_cf` (v2) (ryoqun)
* Keep Cache and Env alive with Rc (acrrd)
* Add `DB::open_cf_with_ttl` method (fdeantoni)
## 0.15.0 (2020-08-25)
* Fix building rocksdb library on windows host (aleksuss)
* Add github actions CI for windows build (aleksuss)
* Update doc for `Options::set_compression_type` (wqfish)
* Add clippy linter in CI (aleksuss)
* Use DBPath for backup_restore test (wqfish)
* Allow to build RocksDB with a different stdlib (calavera)
* Add some doc-comments and tiny refactoring (aleksuss)
* Expose `open_with_ttl`. (calavera)
* Fixed build for `x86_64-linux-android` that doesn't support PCLMUL (vimmerru)
* Add support for `SstFileWriter` and `DB::ingest_external_file` (methyl)
* Add set_max_log_file_size and set_recycle_log_file_num to the Options (stanislav-tkach)
* Export the `DEFAULT_COLUMN_FAMILY_NAME` constant (stanislav-tkach)
* Fix slice transformers with no in_domain callback (nelhage)
* Don't segfault on failed a merge operator (nelhage)
* Adding read/write/db/compaction options (linxGnu)
* Add dbpath and env options (linxGnu)
* Add compaction filter factory API (unrealhoang)
* Add link stdlib when linking prebuilt rocksdb (unrealhoang)
* Support fetching sst files metadata, delete files in range, get mem usage (linxGnu)
* Do not set rerun-if-changed=build.rs (xu-cheng)
* Use pretty_assertions in tests (stanislav-tkach)
* librocksdb-sys: update rocksdb to 6.11.4 (ordian)
* Adding backup engine info (linxGnu)
* Implement `Clone` trait for `Options` (stanislav-tkach)
* Added `Send` implementation to `WriteBatch` (stanislav-tkach)
* Extend github actions (stanislav-tkach)
* Avoid copy for merge operator result using delete_callback (xuchen-plus)
## 0.14.0 (2020-04-22)
* Updated lz4 to v1.9.2 (ordian)
* BlockBasedOptions: expose `format_version`, `[index_]block_restart_interval` (ordian)
* Improve `ffi_try` macro to make trailing comma optional (wqfish)
* Add `set_ratelimiter` to the `Options` (PatrickNicholas)
* Add `set_max_total_wal_size` to the `Options` (wqfish)
* Simplify conversion on iterator item (zhangsoledad)
* Add `flush_cf` method to the `DB` (wqfish)
* Fix potential segfault when calling `next` on the `DBIterator` that is at the end of the range (wqfish)
* Move to Rust 2018 (wqfish)
* Fix doc for `WriteBatch::delete` (wqfish)
* Bump `uuid` and `bindgen` dependencies (jonhoo)
* Change APIs that never return error to not return `Result` (wqfish)
* Fix lifetime parameter for iterators (wqfish)
* Add a doc for `optimize_level_style_compaction` method (NikVolf)
* Make `DBPath` use `tempfile` (jder)
* Refactor `db.rs` and `lib.rs` into smaller pieces (jder)
* Check if we're on a big endian system and act upon it (knarz)
* Bump internal snappy version up to 1.1.8 (aleksuss)
* Bump rocksdb version up to 6.7.3 (aleksuss)
* Atomic flush option (mappum)
* Make `set_iterate_upper_bound` method safe (wqfish)
* Add support for data block hash index (dvdplm)
* Add some extra config options (casualjim)
* Add support for range delete APIs (wqfish)
* Improve building `librocksdb-sys` with system libraries (basvandijk)
* Add support for `open_for_read_only` APIs (wqfish)
* Fix doc for `DBRawIterator::prev` and `next` methods (wqfish)
* Add support for `open_as_secondary` APIs (calavera)
## 0.13.0 (2019-11-12)
### Changes
* Added `ReadOptions::set_verify_checksums` and
`Options::set_level_compaction_dynamic_level_bytes` methods (ordian)
* Array of bytes has been changed for pinnable slice for get operations (nbdd0121)
* Implemented `Sync` for `DBRawIterator` (nbdd0121)
* Removed extra copy in DBRawIterator (nbdd0121)
* Added `Options::max_dict_bytes` and `Options::zstd_max_training_bytes` methods(methyl)
* Added Android support (rtsisyk)
* Added lifetimes for `DBIterator` return types (ngotchac)
* Bumped rocksdb up to 6.2.4 (aleksuss)
* Disabled trait derivation for librocksdb-sys (EyeOfPython)
* Added `DB::get_updates_since()` to iterate write batches in a given sequence (nlfiedler)
* Added `ReadOptions::set_tailing()` to create a tailing iterator that continues to
iterate over the database as new records are added (cjbradfield)
* Changed column families storing (aleksuss)
* Exposed the `status` method on iterators (rnarubin)
## 0.12.3 (2019-07-19)
### Changes
* Enabled sse4.2/pclmul for accelerated crc32c (yjh0502)
* Added `set_db_write_buffer_size` to the Options API (rnarubin)
* Bumped RocksDB to 6.1.2 (lispy)
* Added `Sync` and `Send` implementations to `Snapshot` (pavel-mukhanov)
* Added `raw_iterator_cf_opt` to the DB API (rnarubin)
* Added `DB::latest_sequence_number` method (vitvakatu)
## 0.12.2 (2019-05-03)
### Changes
* Updated `compact_range_cf` to use generic arguments (romanz)
* Removed allocations from `SliceTransform` implementation (ekmartin)
* Bumped RocksDB to 5.18.3 (baptistejamin)
* Implemented `delete_range` and `delete_range_cf` (baptistejamin)
* Added contribution guide (rhurkes)
* Cleaned up documentation for `ReadOptions.set_iterate_upper_bound` method (xiaobogaga)
* Added `flush` and `flush_opt` operations (valeriansaliou)
## 0.12.1 (2019-03-27)
### Changes
* Added `iterator_cf_opt` function to `DB` (elichai)
* Added `set_allow_mmap_writes` and `set_allow_mmap_reads` functions to `Options` (aleksuss)
## 0.12.0 (2019-03-10)
### Changes
* Added support for PlainTable factories (ekmartin)
* Added ability to restore latest backup (rohitjoshi)
* Added support for pinnable slices (xxuejie)
* Added ability to get property values (ekmartin)
* Simplified opening database when using non-default column families (iSynaptic)
* `ColumnFamily`, `DBIterator` and `DBRawIterator` now have lifetime parameters to prevent using them after the `DB` has been dropped (iSynaptic)
* Creating `DBIterator` and `DBRawIterator` now accept `ReadOptions` (iSynaptic)
* All database operations that accepted byte slices, `&[u8]`, are now generic and accept anything that implements `AsRef<[u8]>` (iSynaptic)
* Bumped RocksDB to version 5.17.2 (aleksuss)
* Added `set_readahead_size` to `ReadOptions` (iSynaptic)
* Updated main example in doc tests (mohanson)
* Updated requirements documentation (jamesray1)
* Implemented `AsRef<[u8]>` for `DBVector` (iSynaptic)
## 0.11.0 (2019-01-10)
### Announcements
* This is the first release under the new [Maintainership](MAINTAINERSHIP.md) model.
Three contributors have been selected to help maintain this library -- Oleksandr Anyshchenko ([@aleksuss](https://github.com/aleksuss)), Jordan Terrell ([@iSynaptic](https://github.com/iSynaptic)), and Ilya Bogdanov ([@vitvakatu](https://github.com/vitvakatu)). Many thanks to Tyler Neely ([@spacejam](https://github.com/spacejam)) for your support while taking on this new role.
* A [gitter.im chat room](https://gitter.im/rust-rocksdb/Lobby) has been created. Although it's not guaranteed to be "staffed", it may help to collaborate on changes to `rust-rocksdb`.
### Changes
* added LZ4, ZSTD, ZLIB, and BZIP2 compression support (iSynaptic)
* added support for `Checkpoint` (aleksuss)
* added support for `SliceTransform` (spacejam)
* added `DBPath` struct to ensure test databases are cleaned up (ekmartin, iSynaptic)
* fixed `rustfmt.toml` to work with newer `rustfmt` version (ekmartin, iSynaptic)
* bindgen bumped up to 0.43 (s-panferov)
* made `ColumnFamily` struct `Send` (Tpt)
* made `DBIterator` struct `Send` (Elzor)
* `create_cf` and `drop_cf` methods on `DB` now work with immutable references (aleksuss)
* fixed crash in `test_column_family` test on macOS (aleksuss)
* fixed/implemented CI builds for macOS and Windows (aleksuss, iSynaptic)
* exposed `set_skip_stats_update_on_db_open` option (romanz)
* exposed `keep_log_file_num` option (romanz)
* added ability to retrieve `WriteBatch` serialized size (romanz)
* added `set_options` method to `DB` to allow changing options without closing and re-opening the database (romanz)
## 0.10.1 (2018-07-17)
* bump bindgen to 0.37 (ekmartin)
* bump rocksdb to 5.14.2 (ekmartin)
* add disable_cache to block-based options (ekmartin)
* add set_wal_dir (ekmartin)
* add set_memtable_prefix_bloom_ratio (ekmartin)
* add MemtableFactory support (ekmartin)
* add full_iterator (ekmartin)
* allow index type specification on block options (ekmartin)
* fix windows build (iSynaptic)
## 0.10.0 (2018-03-17)
* Bump rocksdb to 5.11.3 (spacejam)
### New Features
* Link with system rocksdb and snappy libs through envvars (ozkriff)
### Breaking Changes
* Fix reverse iteration from a given key (ongardie)
## 0.9.1 (2018-02-10)
### New Features
* SliceTransform support (spacejam)
## 0.9.0 (2018-02-10)
### New Features
* Allow creating iterators over prefixes (glittershark)
### Breaking Changes
* Open cfs with options (garyttierney, rrichardson)
* Non-Associative merge ops (rrichardson)
## 0.8.3 (2018-02-10)
* Bump rocksdb to 5.10.2 (ongardie)
* Add Send marker to Options (iSynaptic)
* Expose advise_random_on_open option (ongardie)
## 0.8.2 (2017-12-28)
* Bump rocksdb to 5.7.1 (jquesnelle)
## 0.8.1 (2017-09-08)
* Added list_cf (jeizsm)
## 0.8.0 (2017-09-02)
* Removed set_disable_data_sync (glittershark)
## 0.7.2 (2017-09-02)
* Bumped rocksdb to 5.6.2 (spacejam)
## 0.7.1 (2017-08-29)
* Bumped rocksdb to 5.6.1 (vmx)
## 0.7 (2017-07-26)
### Breaking Changes
* Bumped rocksdb to 5.4.6 (derekdreery)
* Remove `use_direct_writes` now that `use_direct_io_for_flush_and_compaction` exists (derekdreery)
### New Features
* ReadOptions is now public (rschmukler)
* Implement Clone and AsRef<str> for Error (daboross)
* Support for `seek_for_prev` (kaedroho)
* Support for DirectIO (kaedroho)
### Internal Cleanups
* Fixed race condition in tests (debris)
* Move tests to the default `tests` directory (vmx)
## 0.6.1 (2017-03-13)
### New Features
* Support for raw iterator access (kaedroho)
## 0.6 (2016-12-18)
### Breaking Changes
* Comparator function now returns an Ordering (alexreg)
### New Features
* Compaction filter (tmccombs)
* Support for backups (alexreg)
0.5 (2016-11-20)
### Breaking changes
* No more Writable trait, as WriteBatch is not thread-safe as a DB (spacejam)
* All imports of `rocksdb::rocksdb::*` should now be simply `rocksdb::*` (alexreg)
* All errors changed to use a new `rocksdb::Error` type (kaedroho, alexreg)
* Removed `Options.set_filter_deletes` as it was removed in RocksDB (kaedroho)
* Renamed `add_merge_operator` to `set_merge_operator` and `add_comparator` to `set_comparator` (kaedroho)
### New Features
* Windows support (development by jsgf and arkpar. ported by kaedroho)
* The RocksDB library is now built at crate compile-time and statically linked with the resulting binary (development by jsgf and arkpar. ported by kaedroho)
* Cleaned up and improved coverage and tests of the ffi module (alexreg)
* Added many new methods to the `Options` type (development by ngaut, BusyJay, zhangjinpeng1987, siddontang and hhkbp2. ported by kaedroho)
* Added `len` and `is_empty` methods to `WriteBatch` (development by siddontang. ported by kaedroho)
* Added `path` mathod to `DB` (development by siddontang. ported by kaedroho)
* `DB::open` now accepts any type that implements `Into<Path>` as the path argument (kaedroho)
* `DB` now implements the `Debug` trait (kaedroho)
* Add iterator_cf to snapshot (jezell)
* Changelog started

@ -1,48 +1,17 @@
# Contributing to rust-rocksdb # Contributing to RocksDB
Thank you for taking an interest in the project, and contributing to it - it's appreciated! There are several ways you can contribute:
- [Bug Reports](#bug-reports)
- [Feature Requests](#feature-requests)
- [Documentation](#documentation)
- [Discussion](#discussion)
- [Pull Requests](#pull-requests)
**Please note all contributors must adhere to the [code of conduct](code-of-conduct.md).** ## Code of Conduct
The code of conduct is described in [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md)
## Bug Reports ## Contributor License Agreement ("CLA")
[bug-reports]: #bug-reports
- **Ensure the bug has not already been reported** - this can be done with a quick search of the [existing open issues](https://github.com/rust-rocksdb/rust-rocksdb/issues?q=is%3Aissue+is%3Aopen+).
- **Ensure the bug applies to the Rust wrapper, and not the underlying library** - bugs in the RocksDB library should be [reported upstream](https://github.com/facebook/rocksdb/issues).
- When [creating an issue](https://github.com/rust-rocksdb/rust-rocksdb/issues/new) please try to:
- **Use a clear and descriptive title** to identify the issue
- **Provide enough context** to acurately summarize the issue. Not every issue will need detailed steps to recreate, example code, stack traces, etc. - use your own judgment on what information would be helpful to anyone working on the issue. It's easier for someone to skim over too much context, than stop and wait for a response when context is missing.
## Feature Requests In order to accept your pull request, we need you to submit a CLA. You
[feature-requests]: #feature-requests only need to do this once, so if you've done this for another Facebook
Feature requests will primarily come in the form of ergonomics involving the Rust language, or in bringing the wrapper into parity with the library's API. Please create an issue with any relevant information. open source project, you're good to go. If you are submitting a pull
request for the first time, just let us know that you have completed
the CLA and we can cross-check with your GitHub username.
## Documentation Complete your CLA here: <https://code.facebook.com/cla>
[documentation]: #documentation
Much of the documentation should mirror or reference the library's [documentation](https://github.com/facebook/rocksdb/wiki). If the wrapper or its exposed functions are missing documentation or contain inaccurate information please submit a pull request.
## Discussion
[discussion]: #discussion
Discussion around design and development of the wrapper primarily occurs within issues and pull requests. Don't be afraid to participate if you have questions, concerns, insight, or advice.
## Pull Requests
[pull-requests]: #pull-requests
Pull requests are welcome, and when contributing code, the author agrees to do so under the project's [licensing](https://github.com/rust-rocksdb/rust-rocksdb/blob/master/LICENSE) - Apache 2.0 as of the time of this writing. The maintainers greatly appreciate PRs that follow open-source contribution best practices:
1. Fork this repository to your personal GitHub account.
1. Create a branch that includes your changes, **keep changes isolated and granular**.
1. Include any relevant documentation and/or tests. Write [documentation tests](https://doc.rust-lang.org/rustdoc/documentation-tests.html) when relevant.
1. Apply `cargo fmt` to ensure consistent formatting.
1. [Create a pull request](https://help.github.com/en/articles/about-pull-requests) against this repository.
For pull requests that would benefit from discussion and review earlier in the development process, use a [Draft Pull Request](https://help.github.com/en/articles/about-pull-requests#draft-pull-requests).
## Additional Resources
Some useful information for working with RocksDB in Rust:
- [RocksDB library primary site](https://rocksdb.org)
- [RocksDB library GitHub repository](https://github.com/facebook/rocksdb)
- [RocksDB library documentation](https://github.com/facebook/rocksdb/wiki)
- [Rust's Foreign Function Interface (ffi)](https://doc.rust-lang.org/nomicon/ffi.html)
If you prefer to sign a paper copy, we can send you a PDF. Send us an
e-mail or create a new github issue to request the CLA in PDF format.

@ -1,47 +0,0 @@
[package]
name = "rocksdb"
description = "Rust wrapper for Facebook's RocksDB embeddable database"
version = "0.21.0"
edition = "2018"
rust-version = "1.60"
authors = ["Tyler Neely <t@jujit.su>", "David Greenberg <dsg123456789@gmail.com>"]
repository = "https://git.nextgraph.org/NextGraph/rust-rocksdb"
license = "Apache-2.0"
categories = [ "database" ]
keywords = ["database", "embedded", "LSM-tree", "persistence"]
homepage = "https://git.nextgraph.org/NextGraph/rust-rocksdb"
exclude = [
".gitignore",
".travis.yml",
"deploy.sh",
"test/**/*",
]
[workspace]
members = ["librocksdb-sys"]
[features]
default = []
jemalloc = ["librocksdb-sys/jemalloc"]
io-uring = ["librocksdb-sys/io-uring"]
valgrind = []
snappy = ["librocksdb-sys/snappy"]
lz4 = ["librocksdb-sys/lz4"]
zstd = ["librocksdb-sys/zstd"]
zlib = ["librocksdb-sys/zlib"]
bzip2 = ["librocksdb-sys/bzip2"]
rtti = ["librocksdb-sys/rtti"]
multi-threaded-cf = []
serde1 = ["serde"]
[dependencies]
libc = "0.2"
librocksdb-sys = { path = "librocksdb-sys", version = "0.11.0" }
serde = { version = "1", features = [ "derive" ], optional = true }
[dev-dependencies]
trybuild = "1.0"
tempfile = "3.1"
pretty_assertions = "1.0"
bincode = "1.3"
serde = { version = "1", features = [ "derive" ] }

@ -1,202 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

@ -1,43 +0,0 @@
Maintainers agree to operate under this set of guidelines:
#### Authority
Maintainers are trusted to close issues, merge pull requests, and publish crates to cargo.
#### Categories of Work
0. Minor
* updating the changelog
* requires no approval
1. Normal
* librocksdb-sys updates
* API tracking code in the rocksdb crate that does not change control flow
* breaking changes due to removed functionality in rocksdb
* require 1 approval from another maintainer. if no maintainer is able to be reached for 2 weeks, then progress may be made anyway
* patch (and post-1.0, minor) releases to crates.io that contain only the above work
2. Major
* breaking API changes that are not direct consequences of underlying rocksdb changes
* refactoring, which should generally only be done for clearly functional reasons like to aid in the completion of a specific task
* require consensus among all maintainers unless 2 weeks have gone by without full participation
* if 2 weeks have gone by after seeking feedback, and at least one other maintainer has participated, and all participating maintainers are in agreement, then progress may be made anyway
* if action is absolutely urgent, an organization owner may act as a tiebreaker if specifically requested to do so and they agree that making a controversial decision is worth the risk. This should hopefully never occur.
If any maintainer thinks an issue is major, it is major.
#### Changelog Maintenance
* If you are the one who merges a PR that includes an externally-visible change, please describe the change in the changelog and merge it in.
#### Releasing, Publishing
* Releases adhere to [semver](https://semver.org/)
* To cut a release, an issue should be opened for it and reach the required approval based on the above `Categories of Work` section above
* When progress is possible, the issue may be closed and the proposer may publish to crates.io. This is controlled by those in the [crate publishers organization-level team](https://github.com/orgs/rust-rocksdb/teams/crate-publishers).
* Releases should have an associated tag pushed to this repo. I recommend doing this after the publish to crates.io succeeds to prevent any mishaps around pushing a tag for something that can't actually be published.
* The changelog serves as a sort of logical staging area for releases
* If a breaking API change happens, and the changelog has not advanced to a new major version, we roll the changelog to a new major version and open an issue to release the previous patch (and post-1.0, minor) version.
* Before rolling to a new major version, it would be nice to release a non-breaking point release to let current users silently take advantage of any improvements
#### Becoming a Maintainer
* If you have a history of participation in this repo, agree to these rules, and wish to take on maintainership responsibilities, you may open an issue. If an owner agrees, they will add you to the maintainer group and the crate publishers team.

@ -1,61 +1,29 @@
# rust-rocksdb ## RocksDB: A Persistent Key-Value Store for Flash and RAM Storage
![RocksDB build](https://github.com/rust-rocksdb/rust-rocksdb/workflows/RocksDB%20build/badge.svg?branch=master) [![CircleCI Status](https://circleci.com/gh/facebook/rocksdb.svg?style=svg)](https://circleci.com/gh/facebook/rocksdb)
[![crates.io](https://img.shields.io/crates/v/rocksdb.svg)](https://crates.io/crates/rocksdb)
[![documentation](https://docs.rs/rocksdb/badge.svg)](https://docs.rs/rocksdb)
[![license](https://img.shields.io/crates/l/rocksdb.svg)](https://github.com/rust-rocksdb/rust-rocksdb/blob/master/LICENSE)
[![Gitter chat](https://badges.gitter.im/rust-rocksdb/gitter.png)](https://gitter.im/rust-rocksdb/lobby)
![rust 1.60.0 required](https://img.shields.io/badge/rust-1.60.0-blue.svg?label=MSRV)
![GitHub commits (since latest release)](https://img.shields.io/github/commits-since/rust-rocksdb/rust-rocksdb/latest.svg) RocksDB is developed and maintained by Facebook Database Engineering Team.
It is built on earlier work on [LevelDB](https://github.com/google/leveldb) by Sanjay Ghemawat (sanjay@google.com)
and Jeff Dean (jeff@google.com)
## Requirements This code is a library that forms the core building block for a fast
key-value server, especially suited for storing data on flash drives.
It has a Log-Structured-Merge-Database (LSM) design with flexible tradeoffs
between Write-Amplification-Factor (WAF), Read-Amplification-Factor (RAF)
and Space-Amplification-Factor (SAF). It has multi-threaded compactions,
making it especially suitable for storing multiple terabytes of data in a
single database.
- Clang and LLVM Start with example usage here: https://github.com/facebook/rocksdb/tree/main/examples
### On OpenBSD See the [github wiki](https://github.com/facebook/rocksdb/wiki) for more explanation.
``` The public interface is in `include/`. Callers should not include or
pkg_add llvm rely on the details of any other header files in this package. Those
``` internal APIs may be changed without warning.
### On macos Questions and discussions are welcome on the [RocksDB Developers Public](https://www.facebook.com/groups/rocksdb.dev/) Facebook group and [email list](https://groups.google.com/g/rocksdb) on Google Groups.
``` ## License
port install clang
```
### On windows RocksDB is dual-licensed under both the GPLv2 (found in the COPYING file in the root directory) and Apache 2.0 License (found in the LICENSE.Apache file in the root directory). You may select, at your option, one of the above-listed licenses.
download from [here](https://github.com/llvm/llvm-project/releases/download/llvmorg-16.0.0/LLVM-16.0.0-win64.exe)
## Contributing
Feedback and pull requests welcome! If a particular feature of RocksDB is
important to you, please let me know by opening an issue, and I'll
prioritize it.
## Compression Support
By default, support for the [Snappy](https://github.com/google/snappy),
[LZ4](https://github.com/lz4/lz4), [Zstd](https://github.com/facebook/zstd),
[Zlib](https://zlib.net), and [Bzip2](http://www.bzip.org) compression
is enabled through crate features. If support for all of these compression
algorithms is not needed, default features can be disabled and specific
compression algorithms can be enabled. For example, to enable only LZ4
compression support, make these changes to your Cargo.toml:
```
[dependencies.rocksdb]
default-features = false
features = ["lz4"]
```
## Multithreaded ColumnFamily alternation
The underlying RocksDB does allow column families to be created and dropped
from multiple threads concurrently. But this crate doesn't allow it by default
for compatibility. If you need to modify column families concurrently, enable
crate feature called `multi-threaded-cf`, which makes this binding's
data structures to use RwLock by default. Alternatively, you can directly create
`DBWithThreadMode<MultiThreaded>` without enabling the crate feature.

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save