Remove unnecessary locks

Compact() is an uppercase function that deals with locks on its own, so we shouldn't have a lock around it.

Signed-off-by: Lukasz Mierzwa <lukasz@cloudflare.com>
This commit is contained in:
Lukasz Mierzwa 2024-08-28 10:47:40 +01:00 committed by Lukasz Mierzwa
parent d106b3beb7
commit a1740cd2e7

View file

@ -1518,9 +1518,7 @@ func (db *DB) compactBlocks() (err error) {
default:
}
db.mtx.RLock()
uids, err := db.compactor.Compact(db.dir, plan, db.blocks)
db.mtx.RUnlock()
if err != nil {
return fmt.Errorf("compact %s: %w", plan, err)
}