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

@@ -94,9 +94,9 @@ func (v *Volume) CommitCompact() error {
}
glog.V(0).Infof("Committing volume %d vacuuming...", v.Id)
v.isCompacting = true
v.isCommitCompacting = true
defer func() {
v.isCompacting = false
v.isCommitCompacting = false
}()
v.dataFileAccessLock.Lock()