volume: fix loading old volume format

fix https://github.com/chrislusf/seaweedfs/issues/2487
This commit is contained in:
chrislu 2021-12-05 01:06:01 -08:00
parent b70cb3e0b2
commit 59e58c4b23

View file

@ -83,6 +83,9 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind
if alreadyHasSuperBlock {
err = v.readSuperBlock()
if err == nil {
v.volumeInfo.Version = uint32(v.SuperBlock.Version)
}
glog.V(0).Infof("readSuperBlock volume %d version %v", v.Id, v.SuperBlock.Version)
if v.HasRemoteFile() {
// maybe temporary network problem