diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2022-04-26 23:29:22 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-26 23:29:22 -0700 |
| commit | ffe028f8d097ccf579947478fd5d0785f2d08191 (patch) | |
| tree | e64a34948a077a199d988c4588115cbf04c68d5f | |
| parent | 37ab8909b00c35fc8dce8eb7aba795bb7d8e438d (diff) | |
| parent | 7315d1d0397a939742fb5d704a3bb95ece9d8d31 (diff) | |
| download | seaweedfs-ffe028f8d097ccf579947478fd5d0785f2d08191.tar.xz seaweedfs-ffe028f8d097ccf579947478fd5d0785f2d08191.zip | |
Merge pull request #2974 from kmlebedev/wait_volume_closed_compression
waite volume being closed during compression idx
| -rw-r--r-- | weed/storage/volume.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/storage/volume.go b/weed/storage/volume.go index b4791692e..bebeded54 100644 --- a/weed/storage/volume.go +++ b/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) } |
