crl-release-26.1: pebble: show blob reference size in compaction events#6096
Merged
RaduBerinde merged 2 commits intoJun 22, 2026
Conversation
Previously, the per-level size in compaction event log lines reflected
only the sum of the input tables' sizes, e.g.:
L0 [31152773 31152772] (747KB) Score=1.31
This omitted the physical size of any blob references, so the reported
size understated the amount of data the tables actually represent when
value separation is in use.
This change sums the `EstimatedPhysicalSize` of each table's blob
references and, when non-zero, renders the level size as `(x + y)`,
where `x` is the table size and `y` is the blob reference size, e.g.:
L0 [31152773 31152772] (747KB + 1.2MB) Score=1.31
A new `TableInfo.EstimatedReferenceSize` method is added (mirroring the
existing `TableMetadata.EstimatedReferenceSize`) since the underlying
`blobReferences` field is package-private to `manifest`. Levels without
blob references are unchanged.
Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
Compaction event log lines now render a level's size as `(table + blob)` (e.g. `(4.2MB + 1.0MB)`) when the input tables reference blob files. The log parser previously assumed a single size value inside the parentheses: - The `compactionPattern` regexp required the closing paren immediately after the first size, so the `bytes` capture (used for the output size of an `compacted` line) matched nothing for the new format. - `sumInputBytes` passed the entire parenthesized contents to `unHumanize`, which only understands a single size token. This change teaches the parser about the optional `+ <size>` suffix. The regexp now accepts one or more `+`-separated sizes within the parentheses, and a new `unHumanizeSum` helper splits on `+` and sums the parts. Both the input-byte and output-byte parsing paths use it, so the reported sizes include the estimated physical size of blob references. Co-Authored-By: roachdev-claude <roachdev-claude-bot@cockroachlabs.com>
Member
sumeerbhola
approved these changes
Jun 16, 2026
sumeerbhola
left a comment
Contributor
There was a problem hiding this comment.
@sumeerbhola made 1 comment.
Reviewable status: 0 of 5 files reviewed, all discussions resolved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pebble: show blob reference size in compaction events
Previously, the per-level size in compaction event log lines reflected
only the sum of the input tables' sizes, e.g.:
This omitted the physical size of any blob references, so the reported
size understated the amount of data the tables actually represent when
value separation is in use.
This change sums the
EstimatedPhysicalSizeof each table's blobreferences and, when non-zero, renders the level size as
(x + y),where
xis the table size andyis the blob reference size, e.g.:A new
TableInfo.EstimatedReferenceSizemethod is added (mirroring theexisting
TableMetadata.EstimatedReferenceSize) since the underlyingblobReferencesfield is package-private tomanifest. Levels withoutblob references are unchanged.
Co-Authored-By: roachdev-claude roachdev-claude-bot@cockroachlabs.com
tool/logs: parse blob reference size in compaction log lines
Compaction event log lines now render a level's size as
(table + blob)(e.g.
(4.2MB + 1.0MB)) when the input tables reference blob files. Thelog parser previously assumed a single size value inside the parentheses:
compactionPatternregexp required the closing paren immediatelyafter the first size, so the
bytescapture (used for the output sizeof an
compactedline) matched nothing for the new format.sumInputBytespassed the entire parenthesized contents tounHumanize, which only understands a single size token.This change teaches the parser about the optional
+ <size>suffix. Theregexp now accepts one or more
+-separated sizes within theparentheses, and a new
unHumanizeSumhelper splits on+and sums theparts. Both the input-byte and output-byte parsing paths use it, so the
reported sizes include the estimated physical size of blob references.
Co-Authored-By: roachdev-claude roachdev-claude-bot@cockroachlabs.com