Find a file
Guido Tagliavini Ponce b52620ab0e Fix key size in cache_bench (#10234)
Summary:
cache_bench wasn't generating 16B keys, which are necessary for FastLRUCache. Also:
- Added asserts in cache_bench, which is assuming that inserts never fail. When they fail (for example, if we used keys of the wrong size), memory allocated to the values will becomes leaked, and eventually the program crashes.
- Move kCacheKeySize to the right spot.

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

Test Plan:
``make -j24 check``. Also, run cache_bench with FastLRUCache and check that memory usage doesn't blow up:
``./cache_bench -cache_type=fast_lru_cache -num_shard_bits=6 -skewed=true \
                        -lookup_insert_percent=100 -lookup_percent=0 -insert_percent=0 -erase_percent=0 \
                        -populate_cache=true -cache_size=1073741824 -ops_per_thread=10000000 \
                        -value_bytes=8192 -resident_ratio=1 -threads=16``

Reviewed By: pdillinger

Differential Revision: D37382949

Pulled By: guidotag

fbshipit-source-id: b697a942ebb215de5d341f98dc8566763436ba9b
2022-06-23 11:26:50 -07:00
.circleci Adapt benchmark result script to new fields. (#10120) 2022-06-22 09:26:13 -07:00
.github/workflows
buckifier Use optimized folly DistributedMutex in LRUCache when available (#10179) 2022-06-17 13:08:45 -07:00
build_tools Adapt benchmark result script to new fields. (#10120) 2022-06-22 09:26:13 -07:00
cache Fix key size in cache_bench (#10234) 2022-06-23 11:26:50 -07:00
cmake
coverage
db Don't count no prefix as Bloom hit (#10244) 2022-06-23 11:00:27 -07:00
db_stress_tool Dynamically changeable MemPurge option (#10011) 2022-06-23 09:42:18 -07:00
docs Bump nokogiri from 1.13.4 to 1.13.6 in /docs (#10019) 2022-05-20 11:00:15 -07:00
env Fix typo in comments and code (#10233) 2022-06-22 15:45:21 -07:00
examples Add a simple example of backup and restore (#10054) 2022-06-03 23:25:31 -07:00
file Fix typo in comments and code (#10233) 2022-06-22 15:45:21 -07:00
fuzz
include/rocksdb Dynamically changeable MemPurge option (#10011) 2022-06-23 09:42:18 -07:00
java Dynamically changeable MemPurge option (#10011) 2022-06-23 09:42:18 -07:00
logging Deflake unit test BackupEngineTest.Concurrency (#10069) 2022-05-31 09:36:32 -07:00
memory Fail DB::Open() if logger cannot be created (#9984) 2022-05-27 07:23:31 -07:00
memtable Rewrite memory-charging feature's option API (#9926) 2022-05-17 15:01:51 -07:00
microbench Fix overflow in ribbon_bench after #10184 (#10195) 2022-06-17 12:53:57 -07:00
monitoring Update stats to help users estimate MultiGet async IO impact (#10182) 2022-06-16 12:12:43 -07:00
options Dynamically changeable MemPurge option (#10011) 2022-06-23 09:42:18 -07:00
plugin
port Fix typo in comments and code (#10233) 2022-06-22 15:45:21 -07:00
table Fix typo in comments and code (#10233) 2022-06-22 15:45:21 -07:00
test_util Fix a bug of not setting enforce_single_del_contracts (#10027) 2022-05-20 16:48:50 -07:00
third-party
tools Add the blob cache to the stress tests and the benchmarking tool (#10202) 2022-06-22 16:04:03 -07:00
trace_replay Use std::numeric_limits<> (#9954) 2022-05-05 13:08:21 -07:00
util Fix typo in comments and code (#10233) 2022-06-22 15:45:21 -07:00
utilities Expose the initial logger creation error (#10223) 2022-06-22 08:26:38 -07:00
.clang-format
.gitignore Snapshots with user-specified timestamps (#9879) 2022-06-10 16:07:03 -07:00
.lgtm.yml
.travis.yml
.watchmanconfig
AUTHORS
CMakeLists.txt Read blob from blob cache if exists when GetBlob() (#10178) 2022-06-17 15:22:59 -07:00
CODE_OF_CONDUCT.md
common.mk Clean up variables for temporary directory (#9961) 2022-05-06 16:38:06 -07:00
CONTRIBUTING.md
COPYING
crash_test.mk Clean up variables for temporary directory (#9961) 2022-05-06 16:38:06 -07:00
DEFAULT_OPTIONS_HISTORY.md
DUMP_FORMAT.md
HISTORY.md Dynamically changeable MemPurge option (#10011) 2022-06-23 09:42:18 -07:00
INSTALL.md Update supported VS versions in INSTALL.md (#9823) 2022-04-13 13:03:40 -07:00
issue_template.md
LANGUAGE-BINDINGS.md
LICENSE.Apache
LICENSE.leveldb
Makefile Read blob from blob cache if exists when GetBlob() (#10178) 2022-06-17 15:22:59 -07:00
PLUGINS.md Add pmem-rocksdb-plugin link in PLUGINs.md (#9934) 2022-05-12 22:02:28 -07:00
README.md
rocksdb.pc.in build: fix pkg-config file generation (#9953) 2022-05-30 12:46:40 -07:00
ROCKSDB_LITE.md
src.mk Read blob from blob cache if exists when GetBlob() (#10178) 2022-06-17 15:22:59 -07:00
TARGETS Read blob from blob cache if exists when GetBlob() (#10178) 2022-06-17 15:22:59 -07:00
thirdparty.inc
USERS.md
Vagrantfile
WINDOWS_PORT.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.

Questions and discussions are welcome on the RocksDB Developers Public Facebook group and email list on Google Groups.

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.