Skip to content

sstable: treat NumDeletionsThreshold as inclusive for tombstone-dense blocks#6013

Open
cuiweixie wants to merge 1 commit intocockroachdb:masterfrom
cuiweixie:sstable-tombstone-dense-threshold-ge
Open

sstable: treat NumDeletionsThreshold as inclusive for tombstone-dense blocks#6013
cuiweixie wants to merge 1 commit intocockroachdb:masterfrom
cuiweixie:sstable-tombstone-dense-threshold-ge

Conversation

@cuiweixie
Copy link
Copy Markdown
Contributor

Previously maybeIncrementTombstoneDenseBlocks in both writers compared numDeletions > NumDeletionsThreshold, so a block with exactly NumDeletionsThreshold point tombstones was not counted toward NumTombstoneDenseBlocks.

Use >= so behavior matches the documented definition ("at least N point tombstones") in docs/RFCS/20240701_tombstone_density_heuristic.md, sstable/properties.go, and Options.Experimental.NumDeletionsThreshold.

… blocks

Previously `maybeIncrementTombstoneDenseBlocks` in both writers compared `numDeletions > NumDeletionsThreshold`, so a block with exactly `NumDeletionsThreshold` point tombstones was not counted toward `NumTombstoneDenseBlocks`.

Use `>=` so behavior matches the documented definition ("at least `N` point tombstones") in `docs/RFCS/20240701_tombstone_density_heuristic.md`, `sstable/properties.go`, and `Options.Experimental.NumDeletionsThreshold`.
@cuiweixie cuiweixie requested a review from a team as a code owner April 30, 2026 12:39
@cuiweixie cuiweixie requested a review from sumeerbhola April 30, 2026 12:39
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants