diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-03-17 09:43:57 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-03-17 09:43:57 -0700 |
| commit | c3cb6fa1d75916dc463c258ccdd91ba7a0dbd5da (patch) | |
| tree | 5aa61dee8341501b74a85a77d061a03da0b0f33e /weed/storage/volume_loading.go | |
| parent | 12df236defbc537ad12bc43e8c437f888b4eb5e6 (diff) | |
| download | seaweedfs-c3cb6fa1d75916dc463c258ccdd91ba7a0dbd5da.tar.xz seaweedfs-c3cb6fa1d75916dc463c258ccdd91ba7a0dbd5da.zip | |
volume: compaction can cause readonly volumes
address https://github.com/chrislusf/seaweedfs/issues/1233
Diffstat (limited to 'weed/storage/volume_loading.go')
| -rw-r--r-- | weed/storage/volume_loading.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/storage/volume_loading.go b/weed/storage/volume_loading.go index 6b42fc452..3b0897bca 100644 --- a/weed/storage/volume_loading.go +++ b/weed/storage/volume_loading.go @@ -94,7 +94,7 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind glog.V(0).Infof("volumeDataIntegrityChecking failed %v", err) } - if v.noWriteOrDelete || v.noWriteCanDelete { + if v.IsReadOnly() { if v.nm, err = NewSortedFileNeedleMap(fileName, indexFile); err != nil { glog.V(0).Infof("loading sorted db %s error: %v", fileName+".sdx", err) } |
