skip network error when remote volumes start

This commit is contained in:
Chris Lu committed 2021-03-01 01:20:06 -08:00
1 parent 6e43e8ce17
commit c46d16b2f3
2 files changed
+8

No files matched your search

+5
View File
@@ -84,6 +84,11 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind
if alreadyHasSuperBlock {
err = v.readSuperBlock()
glog.V(0).Infof("readSuperBlock volume %d version %v", v.Id, v.SuperBlock.Version)
if v.HasRemoteFile() {
// maybe temporary network problem
glog.Errorf("readSuperBlock remote volume %d: %v", v.Id, err)
err = nil
}
} else {
if !v.SuperBlock.Initialized() {
return fmt.Errorf("volume %s not initialized", v.FileName(".dat"))