Browse Source

Merge pull request #2974 from kmlebedev/wait_volume_closed_compression

waite volume being closed during compression idx
pull/2982/head
Chris Lu 3 years ago
committed by GitHub
parent
commit
ffe028f8d0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      weed/storage/volume.go

4
weed/storage/volume.go

@ -211,6 +211,10 @@ func (v *Volume) Close() {
v.dataFileAccessLock.Lock()
defer v.dataFileAccessLock.Unlock()
if v.nm != nil {
for v.isCompacting {
glog.Warningf("Volume being closed during compression idx %d", v.Id)
time.Sleep(time.Second)
}
if err := v.nm.Sync(); err != nil {
glog.Warningf("Volume Close fail to sync volume idx %d", v.Id)
}

Loading…
Cancel
Save