Skip to content

Commit

Permalink
db: remove panic when cleanup jobs queue is full
Browse files Browse the repository at this point in the history
This assertion was hit while stress-testing `TestIteratorErrors`. It
is not necessary, since the code is designed to block as needed. It
was there to make sure we never block under normal circumstances.
RaduBerinde committed Jan 30, 2024
1 parent da06c19 commit 067159e
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions cleaner.go
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@ import (

"github.com/cockroachdb/errors/oserror"
"github.com/cockroachdb/pebble/internal/base"
"github.com/cockroachdb/pebble/internal/invariants"
"github.com/cockroachdb/pebble/objstorage"
"github.com/cockroachdb/tokenbucket"
)
@@ -123,10 +122,6 @@ func (cm *cleanupManager) EnqueueJob(jobID int, obsoleteFiles []obsoleteFile) {
cm.maybeLogLocked()
cm.mu.Unlock()

if invariants.Enabled && len(cm.jobsCh) >= cap(cm.jobsCh)-2 {
panic("cleanup jobs queue full")
}

cm.jobsCh <- job
}

0 comments on commit 067159e

Please sign in to comment.