mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-18 21:37:56 +08:00
avoid load volume file with BytesOffset mismatch (#3841)
* avoid load volume file with BytesOffset mismatch https://github.com/seaweedfs/seaweedfs/issues/2966 * set BytesOffset if has not VolumeInfoFile * typos fail => failed * exit if bytesOffset mismatch
This commit is contained in:

committed by
GitHub

parent
f19c9e3d9d
commit
2f72103c83
@@ -548,12 +548,12 @@ func (s *Store) ConfigureVolume(i needle.VolumeId, replication string) error {
|
||||
vifFile := filepath.Join(location.Directory, baseFileName+".vif")
|
||||
volumeInfo, _, _, err := volume_info.MaybeLoadVolumeInfo(vifFile)
|
||||
if err != nil {
|
||||
return fmt.Errorf("volume %d fail to load vif: %v", i, err)
|
||||
return fmt.Errorf("volume %d failed to load vif: %v", i, err)
|
||||
}
|
||||
volumeInfo.Replication = replication
|
||||
err = volume_info.SaveVolumeInfo(vifFile, volumeInfo)
|
||||
if err != nil {
|
||||
return fmt.Errorf("volume %d fail to save vif: %v", i, err)
|
||||
return fmt.Errorf("volume %d failed to save vif: %v", i, err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user