Skip to content

Commit

Permalink
db: drop hints that produce too many virtual sstables
Browse files Browse the repository at this point in the history
Previously we kept around hints that were creating too many
virtual sstables instead of dropping them. This change drops them.

Fixes #4055.
  • Loading branch information
itsbilal committed Oct 16, 2024
1 parent 9522f39 commit 8b6d64f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions compaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -2113,9 +2113,9 @@ func checkDeleteCompactionHints(
}
if filesDeletedByCurrentHint < 0 {
// This hint does not delete a sufficient number of files to warrant
// a delete-only compaction at this stage. Add it to unresolvedHints
// so it can be re-evaluated later.
unresolvedHints = append(unresolvedHints, h)
// a delete-only compaction at this stage. Drop it (ie. don't add it
// to either resolved or unresolved hints) so it doesn't stick around
// forever.
continue
}
// This hint will be resolved and dropped.
Expand Down
4 changes: 2 additions & 2 deletions testdata/compaction_delete_only_hints
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ o: (o, .)
maybe-compact
----
Deletion hints:
L0.000005 l-m seqnums(tombstone=11-11, file-smallest=10, type=point-and-range-key)
(none)
Compactions:
(none)

Expand All @@ -701,4 +701,4 @@ o: (o, .)

get-hints
----
L0.000005 l-m seqnums(tombstone=11-11, file-smallest=10, type=point-and-range-key)
(none)

0 comments on commit 8b6d64f

Please sign in to comment.