mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
skip network error when remote volumes start
This commit is contained in:
parent
6e43e8ce17
commit
c46d16b2f3
|
@ -36,6 +36,9 @@ func NewReplicaPlacementFromByte(b byte) (*ReplicaPlacement, error) {
|
|||
}
|
||||
|
||||
func (rp *ReplicaPlacement) Byte() byte {
|
||||
if rp == nil {
|
||||
return 0
|
||||
}
|
||||
ret := rp.DiffDataCenterCount*100 + rp.DiffRackCount*10 + rp.SameRackCount
|
||||
return byte(ret)
|
||||
}
|
||||
|
|
|
@ -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"))
|
||||
|
|
Loading…
Reference in a new issue