Remove unnecessary error from ToggleCompaction fns

Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
pull/5805/head
Goutham Veeramachaneni 8 years ago
parent 261cd9f393
commit ff4ccb6eb0
No known key found for this signature in database
GPG Key ID: F1C217E8E9023CAD

@ -531,25 +531,21 @@ func (db *DB) Close() error {
}
// DisableCompactions disables compactions.
func (db *DB) DisableCompactions() error {
func (db *DB) DisableCompactions() {
if db.compacting {
db.cmtx.Lock()
db.compacting = false
db.logger.Log("msg", "compactions disabled")
}
return nil
}
// EnableCompactions enables compactions.
func (db *DB) EnableCompactions() error {
func (db *DB) EnableCompactions() {
if !db.compacting {
db.cmtx.Unlock()
db.compacting = true
db.logger.Log("msg", "compactions enabled")
}
return nil
}
// Snapshot writes the current data to the directory.

Loading…
Cancel
Save