aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/volume_loading.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-03-17 09:43:57 -0700
committerChris Lu <chris.lu@gmail.com>2020-03-17 09:43:57 -0700
commitc3cb6fa1d75916dc463c258ccdd91ba7a0dbd5da (patch)
tree5aa61dee8341501b74a85a77d061a03da0b0f33e /weed/storage/volume_loading.go
parent12df236defbc537ad12bc43e8c437f888b4eb5e6 (diff)
downloadseaweedfs-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.go2
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)
}