Find a file
Hui Xiao 11d7329503 Clarify status-handling logic in BlockBasedTableBuilder::WriteRawBlock (#9393)
Summary:
**Context:**
Inside `BlockBasedTableBuilder::WriteRawBlock`, there are multiple places that change local variables `io_s` and `s` while
depend on them. This PR attempts to clarify the relevant logics so that it's easier to read and add places of changing these local variables later (like https://github.com/facebook/rocksdb/pull/9342.) without changing the current behavior.

**Summary:**
- Shorten the lifetime of local var `io_s` and `s` as much as possible to avoid if-else branches by early return

**Test**
- Reasoned against original behavior to verify new changes do not break existing behaviors.
- Rely on CI tests since we are not changing current behavior.

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

Reviewed By: pdillinger

Differential Revision: D33626095

Pulled By: hx235

fbshipit-source-id: 6184d1e1d85d2650d16617c449971988d062ed3f
2022-01-26 10:24:16 -08:00
.circleci Move RADOS support to separate repo (#9206) 2022-01-24 22:50:07 -08:00
.github/workflows Add (& fix) some simple source code checks (#8821) 2021-09-07 21:19:27 -07:00
buckifier Update TARGETS and related scripts (#9310) 2021-12-17 11:51:51 -08:00
build_tools Move HDFS support to separate repo (#9170) 2022-01-24 20:23:54 -08:00
cache Fix unity build with SUPPORT_CLOCK_CACHE (#9309) 2021-12-17 14:15:07 -08:00
cmake gcc-11 and cmake related cleanup (#9286) 2021-12-17 17:04:35 -08:00
coverage Remove asan_symbolize.py for internal asan build (#8737) 2021-09-07 15:39:11 -07:00
db Remove unused option purge_redundant_kvs_while_flush (#9429) 2022-01-26 10:24:16 -08:00
db_stress_tool db_stress: db_stress fails on custom filesystems. (#9352) 2022-01-25 16:22:58 -08:00
docs New blog post for Ribbon filter (#8992) 2021-12-28 21:54:39 -08:00
env Move HDFS support to separate repo (#9170) 2022-01-24 20:23:54 -08:00
examples Remove unused option purge_redundant_kvs_while_flush (#9429) 2022-01-26 10:24:16 -08:00
file Fix race condition in SstFileManagerImpl error recovery code (#9435) 2022-01-25 23:22:58 -08:00
fuzz Remove using namespace (#9369) 2022-01-12 09:31:12 -08:00
include/rocksdb Remove unused option purge_redundant_kvs_while_flush (#9429) 2022-01-26 10:24:16 -08:00
java Move HDFS support to separate repo (#9170) 2022-01-24 20:23:54 -08:00
logging Use system-wide thread ID in info log lines (#9164) 2021-11-12 19:46:06 -08:00
memory Fix compilation error when building static_lib (#9377) 2022-01-12 09:04:01 -08:00
memtable Remove using namespace (#9369) 2022-01-12 09:31:12 -08:00
microbench Skip directory fsync for filesystem btrfs (#8903) 2021-11-03 12:21:27 -07:00
monitoring Restore Regex support for ObjectLibrary::Register, rename new APIs to allow old one to be deprecated in the future (#9362) 2022-01-11 06:33:48 -08:00
options Remove unused option purge_redundant_kvs_while_flush (#9429) 2022-01-26 10:24:16 -08:00
plugin Add initial CMake support to plugin (#9214) 2021-11-30 17:16:53 -08:00
port Add to HISTORY and minor loose ends from #9294, #9254 (#9386) 2022-01-21 13:04:19 -08:00
table Clarify status-handling logic in BlockBasedTableBuilder::WriteRawBlock (#9393) 2022-01-26 10:24:16 -08:00
test_util Remove unused option purge_redundant_kvs_while_flush (#9429) 2022-01-26 10:24:16 -08:00
third-party Remove using namespace (#9369) 2022-01-12 09:31:12 -08:00
tools Remove unused option purge_redundant_kvs_while_flush (#9429) 2022-01-26 10:24:16 -08:00
trace_replay Added TraceOptions::preserve_write_order (#9334) 2021-12-28 15:04:26 -08:00
util Fast path for detecting unchanged prefix_extractor (#9407) 2022-01-21 11:37:46 -08:00
utilities Move RADOS support to separate repo (#9206) 2022-01-24 22:50:07 -08:00
.clang-format
.gitignore gitignore cmake-build-* for CLion integration (#7933) 2021-02-19 13:43:15 -08:00
.lgtm.yml
.travis.yml Re-enable 390x+cmake* Travis jobs (#9110) 2021-11-03 20:30:15 -07:00
.watchmanconfig
appveyor.yml Remove VS2017 from Appveyor CI (#9417) 2022-01-21 16:16:00 -08:00
AUTHORS
CMakeLists.txt Move RADOS support to separate repo (#9206) 2022-01-24 22:50:07 -08:00
CODE_OF_CONDUCT.md
CONTRIBUTING.md
COPYING
DEFAULT_OPTIONS_HISTORY.md Add Options::DisableExtraChecks, clarify force_consistency_checks (#9363) 2022-01-18 17:31:03 -08:00
defs.bzl Make testpilot recognize that these tests have coverage instrumentation 2020-03-20 11:23:23 -07:00
DUMP_FORMAT.md
HISTORY.md Fix race condition in SstFileManagerImpl error recovery code (#9435) 2022-01-25 23:22:58 -08:00
INSTALL.md Update installation instructions (#8158) 2021-04-06 16:02:04 -07:00
issue_template.md Add Google Group to Issue Template 2020-01-28 14:40:37 -08:00
LANGUAGE-BINDINGS.md Update branch name to "main" in README/LANGUAGE_BINDINGS (#8727) 2021-09-01 15:26:34 -07:00
LICENSE.Apache
LICENSE.leveldb
Makefile Move RADOS support to separate repo (#9206) 2022-01-24 22:50:07 -08:00
PLUGINS.md Move RADOS support to separate repo (#9206) 2022-01-24 22:50:07 -08:00
README.md README: De-list slack channel, list Google group (#9387) 2022-01-18 08:19:48 -08:00
ROCKSDB_LITE.md
src.mk Move HDFS support to separate repo (#9170) 2022-01-24 20:23:54 -08:00
TARGETS Move HDFS support to separate repo (#9170) 2022-01-24 20:23:54 -08:00
thirdparty.inc
USERS.md Update USERS.md (#8923) 2021-10-01 16:10:35 -07:00
Vagrantfile
WINDOWS_PORT.md Update branch name in WINDOWS_PORT.md (#8745) 2021-09-01 19:26:39 -07:00

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.