Find a file
Peter Dillinger 9d5c8c89a1 Fix filter partition size logic (#12904)
Summary:
Was checking == a desired number of entries added to a filter, when the combination of whole key and prefix filtering could add more than one entry per table internal key. This could lead to unnecessarily large filter partitions, which could affect performance and block cache fairness.

Also (only somewhat related because of other work in progress):
* Some variable renaming and a new assertion in BlockBasedTableBuilder, to add some clarity.

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

Test Plan:
If you add assertion logic to the base revision checking that the partition cut is requested whenever `keys_added_to_partition_ >= keys_per_partition_`, it fails on a number of db_bloom_filter_test tests. However, such an assertion in the revised code would be essentially redundant with the new logic.

If I added a regression test for this, it would be tricky and fragile, so I don't think it's important enough to chase and maintain.  (Open to suggestions / input.)

Reviewed By: jowlyzhang

Differential Revision: D60557827

Pulled By: pdillinger

fbshipit-source-id: 77a56097d540da6e7851941a26d26ced2d944373
2024-08-02 14:49:02 -07:00
.circleci
.github Attempt to fix the nightly build-linux-clang-13-asan-ubsan-with-folly build 2024-08-01 13:29:56 -07:00
buckifier add export_file to rockdb TARGETS generator and re-gen 2024-05-25 17:10:12 -07:00
build_tools Fix folly build (#12795) 2024-06-22 15:15:02 -07:00
cache Support pro-actively erasing obsolete block cache entries (#12694) 2024-06-07 08:57:11 -07:00
cmake
coverage
db Fix a data race affecting the background error status (#12910) 2024-08-02 14:11:08 -07:00
db_stress_tool SyncWAL() before Close() when FLAGS_avoid_flush_during_shutdown=true in crash test (#12900) 2024-08-02 10:45:34 -07:00
docs
env Add some documentation for Env related interfaces (#12813) 2024-06-28 18:56:40 -07:00
examples
file Handle injected write error after successful WAL write in crash test + misc (#12838) 2024-07-29 13:51:49 -07:00
fuzz
include/rocksdb Add some checks at property block creation side (#12898) 2024-07-31 13:28:17 -07:00
java Fix incorrect refillPeriodMicros unit in the document (#12832) 2024-07-08 18:08:53 -07:00
logging Fix data race in AutoRollLogger (#12436) 2024-03-14 14:28:33 -07:00
memory Set optimize_filters_for_memory by default (#12377) 2024-04-30 08:33:31 -07:00
memtable
microbench
monitoring New PerfContext counters for block cache bytes read (#12459) 2024-03-21 10:46:46 -07:00
options Remove unreachable code (#12846) 2024-07-09 09:24:43 -07:00
plugin
port Fix CondVar::TimedWait for Windows (#12815) 2024-07-08 21:38:21 -07:00
table Fix filter partition size logic (#12904) 2024-08-02 14:49:02 -07:00
test_util Remove redundant no_io parameters to filter functions (#12762) 2024-06-12 18:47:11 -07:00
third-party
tools Handle injected write error after successful WAL write in crash test + misc (#12838) 2024-07-29 13:51:49 -07:00
trace_replay
unreleased_history Fix a data race affecting the background error status (#12910) 2024-08-02 14:11:08 -07:00
util fix the non initialized bug in StderrLogger. (#12839) 2024-07-08 15:59:02 -07:00
utilities Make transaction name conflict check more robust (#12895) 2024-07-30 12:31:02 -07:00
.clang-format
.gitignore add gtags files ignore (#12747) 2024-06-12 21:46:40 -07:00
.lgtm.yml
.watchmanconfig
AUTHORS
CMakeLists.txt Fix folly build (#12795) 2024-06-22 15:15:02 -07:00
CODE_OF_CONDUCT.md
common.mk
CONTRIBUTING.md
COPYING
crash_test.mk
DEFAULT_OPTIONS_HISTORY.md
DUMP_FORMAT.md
HISTORY.md Update history and version for 9.5.fb release (#12880) 2024-07-22 13:15:09 -07:00
INSTALL.md
issue_template.md
LANGUAGE-BINDINGS.md
LICENSE.Apache
LICENSE.leveldb
Makefile Update snappy dependency for Java releases. (#12207) 2024-07-05 09:30:28 -07:00
PLUGINS.md
README.md
rocksdb.pc.in
src.mk Fix folly build (#12795) 2024-06-22 15:15:02 -07:00
TARGETS Add experimental range filters to stress/crash test (#12769) 2024-06-18 16:16:09 -07:00
thirdparty.inc
USERS.md
Vagrantfile
WINDOWS_PORT.md

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

CircleCI 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.