use two flags: v.isCompacting and v.isCommitCompacting

This commit is contained in:
chrislu
2022-04-26 23:28:34 -07:00
parent b557faf175
commit 37ab8909b0
4 changed files with 6 additions and 5 deletions

View File

@@ -54,7 +54,7 @@ func (v *Volume) isFileUnchanged(n *needle.Needle) bool {
// Destroy removes everything related to this volume
func (v *Volume) Destroy() (err error) {
if v.isCompacting {
if v.isCompacting || v.isCommitCompacting {
err = fmt.Errorf("volume %d is compacting", v.Id)
return
}