Browse Source

rename

pull/5894/head
chrislu 4 months ago
parent
commit
fdf7193ae7
  1. 2
      weed/pb/volume_server.proto
  2. 980
      weed/pb/volume_server_pb/volume_server.pb.go
  3. 2
      weed/server/volume_grpc_erasure_coding.go
  4. 2
      weed/storage/erasure_coding/ec_volume.go

2
weed/pb/volume_server.proto

@ -478,7 +478,7 @@ message VolumeInfo {
uint32 version = 2; uint32 version = 2;
string replication = 3; string replication = 3;
uint32 BytesOffset = 4; uint32 BytesOffset = 4;
int64 file_size = 5; // used for EC encoded volumes to store the original file size
int64 dat_file_size = 5; // used for EC encoded volumes to store the original file size
} }
// tiered storage // tiered storage

980
weed/pb/volume_server_pb/volume_server.pb.go
File diff suppressed because it is too large
View File

2
weed/server/volume_grpc_erasure_coding.go

@ -74,7 +74,7 @@ func (vs *VolumeServer) VolumeEcShardsGenerate(ctx context.Context, req *volume_
datSize, _, _ := v.FileStat() datSize, _, _ := v.FileStat()
if err := volume_info.SaveVolumeInfo(baseFileName+".vif", &volume_server_pb.VolumeInfo{ if err := volume_info.SaveVolumeInfo(baseFileName+".vif", &volume_server_pb.VolumeInfo{
Version: uint32(v.Version()), Version: uint32(v.Version()),
FileSize: int64(datSize),
DatFileSize: int64(datSize),
}); err != nil { }); err != nil {
return nil, fmt.Errorf("SaveVolumeInfo %s: %v", baseFileName, err) return nil, fmt.Errorf("SaveVolumeInfo %s: %v", baseFileName, err)
} }

2
weed/storage/erasure_coding/ec_volume.go

@ -69,7 +69,7 @@ func NewEcVolume(diskType types.DiskType, dir string, dirIdx string, collection
ev.Version = needle.Version3 ev.Version = needle.Version3
if volumeInfo, _, found, _ := volume_info.MaybeLoadVolumeInfo(dataBaseFileName + ".vif"); found { if volumeInfo, _, found, _ := volume_info.MaybeLoadVolumeInfo(dataBaseFileName + ".vif"); found {
ev.Version = needle.Version(volumeInfo.Version) ev.Version = needle.Version(volumeInfo.Version)
ev.datFileSize = volumeInfo.FileSize
ev.datFileSize = volumeInfo.DatFileSize
} else { } else {
volume_info.SaveVolumeInfo(dataBaseFileName+".vif", &volume_server_pb.VolumeInfo{Version: uint32(ev.Version)}) volume_info.SaveVolumeInfo(dataBaseFileName+".vif", &volume_server_pb.VolumeInfo{Version: uint32(ev.Version)})
} }

Loading…
Cancel
Save