Skip to content

Exclude blob-separated values from memtable garbage stats - #15148

Open
AbhinavMir wants to merge 1 commit into
facebook:mainfrom
AbhinavMir:blob-aware-memtable-garbage-stats
Open

Exclude blob-separated values from memtable garbage stats#15148
AbhinavMir wants to merge 1 commit into
facebook:mainfrom
AbhinavMir:blob-aware-memtable-garbage-stats

Conversation

@AbhinavMir

Copy link
Copy Markdown

BuildTable derived the number of payload bytes written from the raw key
and value sizes of the output table file only. A value that the blob
file builder extracts is represented in the table file by a blob
reference, so the bytes of the value itself were missing from that
number and MEMTABLE_GARBAGE_BYTES_AT_FLUSH reported them as garbage. A
flush of a column family with enable_blob_files set and no overwritten
or deleted keys reported the full size of the extracted values as
garbage instead of zero.

CompactionIterationStats now records the size of the values that the
compaction iterator replaced with blob references, before and after the
replacement. BuildTable trades the size of the references back for the
size of the values they stand for. Both counts are raw byte counts, so
the result does not change when the blob files are compressed.

The counts cover the plain value path and the wide-column entity path.
Merge operands are still unaccounted for, which is a separate hole in
CompactionIterationStats, so the guard against underflow stays.
@meta-cla

meta-cla Bot commented Aug 25, 2026

Copy link
Copy Markdown

Hi @AbhinavMir!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@AbhinavMir
AbhinavMir marked this pull request as draft August 25, 2026 19:21
@AbhinavMir
AbhinavMir marked this pull request as ready for review August 25, 2026 19:44
@AbhinavMir AbhinavMir closed this Aug 25, 2026
@AbhinavMir AbhinavMir reopened this Aug 25, 2026
@meta-cla

meta-cla Bot commented Aug 25, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla Bot added the CLA Signed label Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant