Go to file
Peter Dillinger 653c392e47 More refactoring ahead of footer & meta changes (#9240)
Summary:
I'm working on a new format_version=6 to support context
checksum (https://github.com/facebook/rocksdb/issues/9058) and this includes much of the refactoring and test
updates to support that change.

Test coverage data and manual inspection agree on dead code in
block_based_table_reader.cc (removed).

Pull Request resolved: https://github.com/facebook/rocksdb/pull/9240

Test Plan:
tests enhanced to cover more cases etc.

Extreme case performance testing indicates small % regression in fillseq (w/ compaction), though CPU profile etc. doesn't suggest any explanation. There is enhanced correctness checking in Footer::DecodeFrom, but this should be negligible.

TEST_TMPDIR=/dev/shm/ ./db_bench -benchmarks=fillseq -memtablerep=vector -allow_concurrent_memtable_write=false -num=30000000 -checksum_type=1 --disable_wal={false,true}

(Each is ops/s averaged over 50 runs, run simultaneously with competing configuration for load fairness)
Before w/ wal: 454512
After w/ wal: 444820 (-2.1%)
Before w/o wal: 1004560
After w/o wal: 998897 (-0.6%)

Since this doesn't modify WAL code, one would expect real effects to be larger in w/o wal case.

This regression will be corrected in a follow-up PR.

Reviewed By: ajkr

Differential Revision: D32813769

Pulled By: pdillinger

fbshipit-source-id: 444a244eabf3825cd329b7d1b150cddce320862f
2021-12-10 08:13:26 -08:00
.circleci Fix some CI output (#9193) 2021-11-20 10:21:58 -08:00
.github/workflows Add (& fix) some simple source code checks (#8821) 2021-09-07 21:19:27 -07:00
buckifier Update buckify scripts (#9104) 2021-11-01 10:11:18 -07:00
build_tools More improvements to output for CircleCI (#9201) 2021-11-23 22:10:27 -08:00
cache Fix build for msvc (#9230) 2021-11-29 14:27:48 -08:00
cmake
coverage Remove asan_symbolize.py for internal asan build (#8737) 2021-09-07 15:39:11 -07:00
db More refactoring ahead of footer & meta changes (#9240) 2021-12-10 08:13:26 -08:00
db_stress_tool Fix segmentation fault in table_options.prepopulate_block_cache when used with partition_filters (#9263) 2021-12-08 12:44:38 -08:00
docs Misc doc fixes (#8983) 2021-10-07 11:22:17 -07:00
env Fix fstatfs call for compilation on 32 bit systems (#9251) 2021-12-08 22:01:23 -08:00
examples Add (& fix) some simple source code checks (#8821) 2021-09-07 21:19:27 -07:00
file Fix bug in rocksdb internal automatic prefetching (#9234) 2021-11-30 22:53:10 -08:00
fuzz
hdfs
include/rocksdb More refactoring ahead of footer & meta changes (#9240) 2021-12-10 08:13:26 -08:00
java Minor RocksJava Java code cosmetics (#9204) 2021-12-09 20:00:48 -08:00
logging Use system-wide thread ID in info log lines (#9164) 2021-11-12 19:46:06 -08:00
memory Fix and detect headers with missing dependencies (#8893) 2021-09-10 10:00:26 -07:00
memtable Minor improvement to CacheReservationManager/WriteBufferManager/CompressionDictBuilding (#9139) 2021-11-05 16:13:47 -07:00
microbench Skip directory fsync for filesystem btrfs (#8903) 2021-11-03 12:21:27 -07:00
monitoring Add tiered storage related read bytes stats to Statistic (#9123) 2021-11-16 15:17:17 -08:00
options Fix an issue with MemTableRepFactory::CreateFromString (#9273) 2021-12-09 12:36:18 -08:00
plugin Add initial CMake support to plugin (#9214) 2021-11-30 17:16:53 -08:00
port Fix/improve 'must free heap allocations' code (#9209) 2021-11-29 10:53:52 -08:00
table More refactoring ahead of footer & meta changes (#9240) 2021-12-10 08:13:26 -08:00
test_util More refactoring ahead of footer & meta changes (#9240) 2021-12-10 08:13:26 -08:00
third-party Add support for building on s390x platform (#8962) 2021-10-22 10:13:15 -07:00
tools Fix segmentation fault in table_options.prepopulate_block_cache when used with partition_filters (#9263) 2021-12-08 12:44:38 -08:00
trace_replay Cleanup includes in dbformat.h (#8930) 2021-09-29 04:04:40 -07:00
util More refactoring ahead of footer & meta changes (#9240) 2021-12-10 08:13:26 -08:00
utilities Debug "Resource temporarily unavailable" exception in CircleCI (#9276) 2021-12-09 12:58:46 -08:00
.clang-format
.gitignore
.lgtm.yml
.travis.yml Re-enable 390x+cmake* Travis jobs (#9110) 2021-11-03 20:30:15 -07:00
.watchmanconfig
AUTHORS
CMakeLists.txt Add initial CMake support to plugin (#9214) 2021-11-30 17:16:53 -08:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md
COPYING
DEFAULT_OPTIONS_HISTORY.md
DUMP_FORMAT.md
HISTORY.md Add a listener callback for end of auto error recovery (#9244) 2021-12-08 14:30:57 -08:00
INSTALL.md
LANGUAGE-BINDINGS.md
LICENSE.Apache
LICENSE.leveldb
Makefile Get DBTest passing Assert Status Checked (#7737) 2021-12-09 11:00:17 -08:00
PLUGINS.md
README.md
ROCKSDB_LITE.md
TARGETS Fix Statistics in db_stress (#9260) 2021-12-07 16:24:22 -08:00
USERS.md Update USERS.md (#8923) 2021-10-01 16:10:35 -07:00
Vagrantfile
WINDOWS_PORT.md
appveyor.yml
defs.bzl
issue_template.md
src.mk Fix Statistics in db_stress (#9260) 2021-12-07 16:24:22 -08:00
thirdparty.inc

README.md

RocksDB: A Persistent Key-Value Store for Flash and RAM Storage

CircleCI Status TravisCI Status Appveyor Build status PPC64le Build Status

RocksDB is developed and maintained by Facebook Database Engineering Team. It is built on earlier work on LevelDB by Sanjay Ghemawat (sanjay@google.com) and Jeff Dean (jeff@google.com)

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.

Start with example usage here: https://github.com/facebook/rocksdb/tree/main/examples

See the github wiki for more explanation.

The public interface is in include/. Callers should not include or rely on the details of any other header files in this package. Those internal APIs may be changed without warning.

Design discussions are conducted in https://www.facebook.com/groups/rocksdb.dev/ and https://rocksdb.slack.com/

License

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.