diff options
| author | Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> | 2023-06-13 10:22:46 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-12 22:22:46 -0700 |
| commit | 4527ead2956c31f3ffca98e7c5af13a3d5b92f1e (patch) | |
| tree | d59fc1802fce5d1d56fe5b989f6e036f34099620 /weed/storage/volume.go | |
| parent | a25bca06927a171ba1d8d459e573bc083ca8c1a8 (diff) | |
| download | seaweedfs-4527ead2956c31f3ffca98e7c5af13a3d5b92f1e.tar.xz seaweedfs-4527ead2956c31f3ffca98e7c5af13a3d5b92f1e.zip | |
fix from comment delete volume is empty (#4573)
* fix from coments
https://github.com/seaweedfs/seaweedfs/pull/4561
* fix tests
---------
Co-authored-by: Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.co>
Diffstat (limited to 'weed/storage/volume.go')
| -rw-r--r-- | weed/storage/volume.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/storage/volume.go b/weed/storage/volume.go index 31960451c..066f06604 100644 --- a/weed/storage/volume.go +++ b/weed/storage/volume.go @@ -333,5 +333,6 @@ func (v *Volume) IsReadOnly() bool { return v.noWriteOrDelete || v.noWriteCanDelete || v.location.isDiskSpaceLow } func (v *Volume) IsEmpty() bool { - return v.ContentSize() == 0 + size, _, _ := v.DataBackend.GetStat() + return size <= 8 && v.ContentSize() == 0 } |
