Find a file
sdong ef91894798 Fix potential overflow in CalculateSSTWriteHint() (#6212)
Summary:
level passed into ColumnFamilyData::CalculateSSTWriteHint() can be smaller than base_level in current version, which would cause overflow.
We see ubsan complains:

db/compaction/compaction_job.cc:1511:39: runtime error: load of value 4294967295, which is not a valid value for type 'Env::WriteLifeTimeHint'

and I hope this commit fixes it.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6212

Test Plan: Run existing tests and see them to pass.

Differential Revision: D19168442

fbshipit-source-id: bf8fd86f85478ecfa7556db46dc3242de8c83dc9
2019-12-18 17:04:15 -08:00
buckifier PosixRandomAccessFile::MultiRead() to use I/O uring if supported (#5881) 2019-12-07 20:55:52 -08:00
build_tools Improve instructions to install formatter (#6162) 2019-12-12 14:04:01 -08:00
cache Remove key length assertion LRUHandle::CalcTotalCharge (#6115) 2019-12-02 15:00:07 -08:00
cmake cmake: do not build tests for Release build and cleanups (#5916) 2019-12-13 12:48:06 -08:00
coverage
db Fix potential overflow in CalculateSSTWriteHint() (#6212) 2019-12-18 17:04:15 -08:00
db_stress_tool Add VerifyChecksum() to db_stress (#6203) 2019-12-17 20:44:58 -08:00
docs
env Fix unity test (#6178) 2019-12-14 15:39:41 -08:00
examples Add example to show the effect of Get in snapshot isolation (#6059) 2019-12-11 09:56:42 -08:00
file Prevent file prefetch when mmap is enabled. (#6206) 2019-12-18 11:01:29 -08:00
hdfs
include/rocksdb delete superversions in BackgroundCallPurge (#6146) 2019-12-17 13:22:57 -08:00
java Avoid heading tags in javadocs; fix EnvironmentTest (#6208) 2019-12-18 13:36:30 -08:00
logging Introduce a new storage specific Env API (#5761) 2019-12-13 14:48:41 -08:00
memory
memtable
monitoring
options Introduce a new storage specific Env API (#5761) 2019-12-13 14:48:41 -08:00
port Work around weird unused errors with Mingw (#6075) 2019-11-26 21:42:29 -08:00
table Prevent file prefetch when mmap is enabled. (#6206) 2019-12-18 11:01:29 -08:00
test_util Introduce a new storage specific Env API (#5761) 2019-12-13 14:48:41 -08:00
third-party Apply formatter to some recent commits (#6138) 2019-12-09 15:49:49 -08:00
tools Fix syntax error (!) in db_crashtest.py (#6207) 2019-12-18 09:32:52 -08:00
trace_replay
util Optimize memory and CPU for building new Bloom filter (#6175) 2019-12-15 21:31:08 -08:00
utilities Fix crash in Transaction::MultiGet() when num_keys > 32 2019-12-16 20:39:35 -08:00
.clang-format
.gitignore
.lgtm.yml
.travis.yml Small tidy and speed up of the travis build (#6181) 2019-12-17 13:56:45 -08:00
.watchmanconfig
appveyor.yml Add Visual Studio 2015 to AppVeyor (#5446) 2019-12-10 20:02:31 -08:00
AUTHORS
CMakeLists.txt Introduce a new storage specific Env API (#5761) 2019-12-13 14:48:41 -08:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md
COPYING
DEFAULT_OPTIONS_HISTORY.md
defs.bzl Add clarifying/instructive header to TARGETS and defs.bzl 2019-11-05 20:20:33 -08:00
DUMP_FORMAT.md
HISTORY.md Add unit tests for concurrent CF iteration and drop (#6180) 2019-12-18 11:54:35 -08:00
INSTALL.md
issue_template.md
LANGUAGE-BINDINGS.md
LICENSE.Apache
LICENSE.leveldb
Makefile Add useful idioms to Random API (OneInOpt, PercentTrue) (#6154) 2019-12-13 14:30:14 -08:00
README.md
ROCKSDB_LITE.md
src.mk Introduce a new storage specific Env API (#5761) 2019-12-13 14:48:41 -08:00
TARGETS Introduce a new storage specific Env API (#5761) 2019-12-13 14:48:41 -08:00
thirdparty.inc
USERS.md
Vagrantfile
WINDOWS_PORT.md

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

Linux/Mac Build Status Windows 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/master/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/

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.