rocksdb/utilities
Levi Tamasi 279c488395 Mark blob files not needed by any memtables/SSTs obsolete (#6032)
Summary:
The patch adds logic to mark no longer needed blob files obsolete upon database open
and whenever a flush or compaction completes. Unneeded blob files are detected by
iterating through live immutable non-TTL blob files starting from the lowest-numbered one,
and stopping when a blob file used by any SSTs or potentially used by memtables is found.
(The latter is determined by comparing the sequence number at which the blob file
became immutable with the largest sequence number received in flush notifications.)

In addition, the patch cleans up the logic around closing and obsoleting blob files and
enforces invariants around this area (blob files are now guaranteed to go through the
stages mutable-non-obsolete, immutable-non-obsolete, and immutable-obsolete in this
order).
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6032

Test Plan: Extended unit tests and tested using the BlobDB mode of `db_bench`.

Differential Revision: D18495610

Pulled By: ltamasi

fbshipit-source-id: 11825b84af74f3f4abfd9bcae04e80870ae58961
2019-11-18 16:30:06 -08:00
..
backupable More fixes to auto-GarbageCollect in BackupEngine (#6023) 2019-11-14 06:20:18 -08:00
blob_db Mark blob files not needed by any memtables/SSTs obsolete (#6032) 2019-11-18 16:30:06 -08:00
cassandra Organizing rocksdb/db directory 2019-05-31 11:57:01 -07:00
checkpoint Add file number/oldest referenced blob file number to {Sst,Live}FileMetaData (#6011) 2019-11-07 14:04:16 -08:00
compaction_filters Comment out unused variables 2018-03-05 13:13:41 -08:00
convenience Auto roll logger to enforce options.keep_log_file_num immediately after a new file is created (#5370) 2019-05-31 10:50:19 -07:00
leveldb_options Change RocksDB License 2017-07-15 16:11:23 -07:00
memory Make clang-analyzer happy (#5821) 2019-09-18 15:25:48 -07:00
merge_operators Apply formatter to recent 200+ commits. (#5830) 2019-09-20 12:04:26 -07:00
option_change_migration Avoid double-compacting data in bottom level in manual compactions (#5138) 2019-04-16 23:32:20 -07:00
options simplify include directive involving inttypes (#5402) 2019-06-06 13:56:07 -07:00
persistent_cache Fix block cache ID uniqueness for Windows builds (#5844) 2019-10-11 18:19:31 -07:00
simulator_cache Apply formatter to recent 200+ commits. (#5830) 2019-09-20 12:04:26 -07:00
table_properties_collectors Reduce the number of random iterations in compact_on_deletion_collector_test (#5635) 2019-07-26 15:53:34 -07:00
trace Divide file_reader_writer.h and .cc (#5803) 2019-09-16 10:33:51 -07:00
transactions Disable SmallestUnCommittedSeq in Valgrind run (#6035) 2019-11-14 14:41:52 -08:00
ttl Apply formatter to recent 200+ commits. (#5830) 2019-09-20 12:04:26 -07:00
write_batch_with_index Batched MultiGet API for multiple column families (#5816) 2019-11-12 13:52:55 -08:00
debug.cc Support GetAllKeyVersions() for non-default cf (#5544) 2019-07-07 22:43:52 -07:00
env_librados_test.cc Move test related files under util/ to test_util/ (#5377) 2019-05-30 11:25:51 -07:00
env_librados.cc Optionally wait on bytes_per_sync to smooth I/O (#5183) 2019-04-22 11:51:39 -07:00
env_librados.md Add EnvLibrados - RocksDB Env of RADOS (#1222) 2016-07-21 11:16:34 -07:00
env_mirror_test.cc Move test related files under util/ to test_util/ (#5377) 2019-05-30 11:25:51 -07:00
env_mirror.cc Optionally wait on bytes_per_sync to smooth I/O (#5183) 2019-04-22 11:51:39 -07:00
env_timed_test.cc Move test related files under util/ to test_util/ (#5377) 2019-05-30 11:25:51 -07:00
env_timed.cc Apply modernize-use-override (2nd iteration) 2019-02-14 14:41:36 -08:00
merge_operators.h New API to get all merge operands for a Key (#5604) 2019-08-06 14:26:44 -07:00
object_registry_test.cc The ObjectRegistry class replaces the Registrar and NewCustomObjects.… (#5293) 2019-07-23 17:13:05 -07:00
object_registry.cc The ObjectRegistry class replaces the Registrar and NewCustomObjects.… (#5293) 2019-07-23 17:13:05 -07:00
util_merge_operators_test.cc Move test related files under util/ to test_util/ (#5377) 2019-05-30 11:25:51 -07:00