volume: fail the volume deletion if compaction is in progress

fix https://github.com/chrislusf/seaweedfs/issues/1035
This commit is contained in:
Chris Lu
2019-08-12 00:53:50 -07:00
parent 6f75df8660
commit e40634e6b4
3 changed files with 23 additions and 0 deletions

View File

@@ -33,6 +33,8 @@ type Volume struct {
lastCompactIndexOffset uint64
lastCompactRevision uint16
isCompacting bool
}
func NewVolume(dirname string, collection string, id needle.VolumeId, needleMapKind NeedleMapType, replicaPlacement *ReplicaPlacement, ttl *needle.TTL, preallocate int64) (v *Volume, e error) {