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. 4
      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;
string replication = 3;
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

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

4
weed/server/volume_grpc_erasure_coding.go

@ -73,8 +73,8 @@ func (vs *VolumeServer) VolumeEcShardsGenerate(ctx context.Context, req *volume_
// write .vif files
datSize, _, _ := v.FileStat()
if err := volume_info.SaveVolumeInfo(baseFileName+".vif", &volume_server_pb.VolumeInfo{
Version: uint32(v.Version()),
FileSize: int64(datSize),
Version: uint32(v.Version()),
DatFileSize: int64(datSize),
}); err != nil {
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
if volumeInfo, _, found, _ := volume_info.MaybeLoadVolumeInfo(dataBaseFileName + ".vif"); found {
ev.Version = needle.Version(volumeInfo.Version)
ev.datFileSize = volumeInfo.FileSize
ev.datFileSize = volumeInfo.DatFileSize
} else {
volume_info.SaveVolumeInfo(dataBaseFileName+".vif", &volume_server_pb.VolumeInfo{Version: uint32(ev.Version)})
}

Loading…
Cancel
Save