From 7cc52cd8f5b9c385ce67619c5f6e7416b52ede4a Mon Sep 17 00:00:00 2001 From: Levi Tamasi Date: Tue, 12 Oct 2021 10:18:42 -0700 Subject: [PATCH] Update HISTORY for PR 8994 (#9017) Summary: Also, expand on/clarify a comment in `VersionStorageInfoTest`. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9017 Reviewed By: riversand963 Differential Revision: D31566130 Pulled By: ltamasi fbshipit-source-id: 1d30c7af084c4de7b2030bc6c768838d65746010 --- HISTORY.md | 1 + db/version_set_test.cc | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index f24aceca1..d1e1e5e12 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -11,6 +11,7 @@ * Provided support for SingleDelete with user defined timestamp. * Add remote compaction read/write bytes statistics: `REMOTE_COMPACT_READ_BYTES`, `REMOTE_COMPACT_WRITE_BYTES`. * Introduce an experimental feature to dump out the blocks from block cache and insert them to the secondary cache to reduce the cache warmup time (e.g., used while migrating DB instance). More information are in `class CacheDumper` and `CacheDumpedLoader` at `rocksdb/utilities/cache_dump_load.h` Note that, this feature is subject to the potential change in the future, it is still experimental. +* Introduced a new BlobDB configuration option `blob_garbage_collection_force_threshold`, which can be used to trigger compactions targeting the SST files which reference the oldest blob files when the ratio of garbage in those blob files meets or exceeds the specified threshold. This can reduce space amplification with skewed workloads where the affected SST files might not otherwise get picked up for compaction. ### Public API change * Made SystemClock extend the Customizable class and added a CreateFromString method. Implementations need to be registered with the ObjectRegistry and to implement a Name() method in order to be created via this method. diff --git a/db/version_set_test.cc b/db/version_set_test.cc index 7bfea79b6..7e683a900 100644 --- a/db/version_set_test.cc +++ b/db/version_set_test.cc @@ -483,9 +483,12 @@ TEST_F(VersionStorageInfoTest, ForcedBlobGCEmpty) { } TEST_F(VersionStorageInfoTest, ForcedBlobGC) { - // Add three L0 SSTs and four blob files. The first two SSTs keep alive the - // first two blob files, while the third SST keeps alive the third and fourth - // blob files. + // Add three L0 SSTs (1, 2, and 3) and four blob files (10, 11, 12, and 13). + // The first two SSTs have the same oldest blob file, namely, the very oldest + // one (10), while the third SST's oldest blob file reference points to the + // third blob file (12). Thus, the oldest batch of blob files contains the + // first two blob files 10 and 11, and assuming they are eligible for GC based + // on the age cutoff, compacting away the SSTs 1 and 2 will eliminate them. constexpr int level = 0;