diff options
author | Levi Tamasi <ltamasi@fb.com> | 2020-03-10 17:24:38 -0700 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2020-03-10 17:27:26 -0700 |
commit | f5bc3b99d52f266724840ed01042d637440fe299 (patch) | |
tree | 7389a2479ee7ef973e01ae90c84799dc63537327 /src.mk | |
parent | 4028eba67b2d424a39f249cabd863bb52695b291 (diff) |
Split BlobFileState into an immutable and a mutable part (#6502)
Summary:
It's never too soon to refactor something. The patch splits the recently
introduced (`VersionEdit` related) `BlobFileState` into two classes
`BlobFileAddition` and `BlobFileGarbage`. The idea is that once blob files
are closed, they are immutable, and the only thing that changes is the
amount of garbage in them. In the new design, `BlobFileAddition` contains
the immutable attributes (currently, the count and total size of all blobs, checksum
method, and checksum value), while `BlobFileGarbage` contains the mutable
GC-related information elements (count and total size of garbage blobs). This is a
better fit for the GC logic and is more consistent with how SST files are handled.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/6502
Test Plan: `make check`
Differential Revision: D20348352
Pulled By: ltamasi
fbshipit-source-id: ff93f0121e80ab15e0e0a6525ba0d6af16a0e008
Diffstat (limited to 'src.mk')
-rw-r--r-- | src.mk | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -4,7 +4,8 @@ LIB_SOURCES = \ cache/lru_cache.cc \ cache/sharded_cache.cc \ db/arena_wrapped_db_iter.cc \ - db/blob_file_state.cc \ + db/blob_file_addition.cc \ + db/blob_file_garbage.cc \ db/builder.cc \ db/c.cc \ db/column_family.cc \ @@ -297,7 +298,8 @@ MAIN_SOURCES = \ cache/cache_bench.cc \ cache/cache_test.cc \ db_stress_tool/db_stress.cc \ - db/blob_file_state_test.cc \ + db/blob_file_addition_test.cc \ + db/blob_file_garbage_test.cc \ db/column_family_test.cc \ db/compact_files_test.cc \ db/compaction/compaction_iterator_test.cc \ |