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
@@ -69,13 +69,13 @@ func (vs *VolumeServer) VolumeTierMoveDatFromRemote(req *volume_server_pb.Volume
|
||||
|
||||
// remove remote file
|
||||
if err := backendStorage.DeleteFile(storageKey); err != nil {
|
||||
return fmt.Errorf("volume %d fail to delete remote file %s: %v", v.Id, storageKey, err)
|
||||
return fmt.Errorf("volume %d failed to delete remote file %s: %v", v.Id, storageKey, err)
|
||||
}
|
||||
|
||||
// forget remote file
|
||||
v.GetVolumeInfo().Files = v.GetVolumeInfo().Files[1:]
|
||||
if err := v.SaveVolumeInfo(); err != nil {
|
||||
return fmt.Errorf("volume %d fail to save remote file info: %v", v.Id, err)
|
||||
return fmt.Errorf("volume %d failed to save remote file info: %v", v.Id, err)
|
||||
}
|
||||
|
||||
v.DataBackend.Close()
|
||||
|
||||
@@ -80,11 +80,11 @@ func (vs *VolumeServer) VolumeTierMoveDatToRemote(req *volume_server_pb.VolumeTi
|
||||
})
|
||||
|
||||
if err := v.SaveVolumeInfo(); err != nil {
|
||||
return fmt.Errorf("volume %d fail to save remote file info: %v", v.Id, err)
|
||||
return fmt.Errorf("volume %d failed to save remote file info: %v", v.Id, err)
|
||||
}
|
||||
|
||||
if err := v.LoadRemoteFile(); err != nil {
|
||||
return fmt.Errorf("volume %d fail to load remote file: %v", v.Id, err)
|
||||
return fmt.Errorf("volume %d failed to load remote file: %v", v.Id, err)
|
||||
}
|
||||
|
||||
if !req.KeepLocalDatFile {
|
||||
|
||||
Reference in New Issue
Block a user