use two flags: v.isCompacting and v.isCommitCompacting

This commit is contained in:
chrislu committed 2022-04-26 23:28:34 -07:00
1 parent b557faf175
commit 37ab8909b0
4 files changed
+6 -5

No files matched your search

+1 -1
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
}