Skip to content

db: elision-only L6 compactions #838

@jbowens

Description

@jbowens

There are a couple circumstances through which a tombstone may be written to a L6 file. An open snapshot can prevent a tombstone's elision during an ordinary compaction, and a move compaction can move a file containing tombstones into L6.

When (if any) blocking snapshots are closed, these tombstones and any covered keys within the same sstable may be elided. Today, this doesn't happen until the compaction of an overlapping file in the above level. These sstables unnecessarily consume disk space, and their point tombstones can introduce latency to range iteration. It's also surprising to have a database with zero keys, zero snapshots and a non-zero number of sstables (cockroachdb/cockroach#51786).

A relevant TODO: https://github.com/cockroachdb/pebble/blob/master/compaction_picker.go#L957-L959

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions