refactoring

This commit is contained in:
Chris Lu
2020-07-03 16:34:31 -07:00
parent 37d5b3ba12
commit faa5c2e89a
3 changed files with 21 additions and 24 deletions

View File

@@ -94,7 +94,7 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind
glog.V(0).Infof("volumeDataIntegrityChecking failed %v", err)
}
if v.IsReadOnly() {
if v.noWriteOrDelete || v.noWriteCanDelete {
if v.nm, err = NewSortedFileNeedleMap(fileName, indexFile); err != nil {
glog.V(0).Infof("loading sorted db %s error: %v", fileName+".sdx", err)
}