From 97d16383422379610eb78ecafebb3bbcd8399733 Mon Sep 17 00:00:00 2001 From: chrislu Date: Mon, 27 Oct 2025 17:58:35 -0700 Subject: [PATCH] fmt --- weed/server/volume_grpc_erasure_coding.go | 4 ++-- weed/storage/erasure_coding/ec_context.go | 1 - weed/storage/erasure_coding/ec_volume.go | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/weed/server/volume_grpc_erasure_coding.go b/weed/server/volume_grpc_erasure_coding.go index 12ec301b6..8ba80a446 100644 --- a/weed/server/volume_grpc_erasure_coding.go +++ b/weed/server/volume_grpc_erasure_coding.go @@ -88,11 +88,11 @@ func (vs *VolumeServer) VolumeEcShardsGenerate(ctx context.Context, req *volume_ datSize, _, _ := v.FileStat() volumeInfo.DatFileSize = int64(datSize) - + // Save EC configuration to VolumeInfo volumeInfo.DataShardsCount = uint32(ecCtx.DataShards) volumeInfo.ParityShardsCount = uint32(ecCtx.ParityShards) - + if err := volume_info.SaveVolumeInfo(baseFileName+".vif", volumeInfo); err != nil { return nil, fmt.Errorf("SaveVolumeInfo %s: %v", baseFileName, err) } diff --git a/weed/storage/erasure_coding/ec_context.go b/weed/storage/erasure_coding/ec_context.go index 4270c58c3..1c8613371 100644 --- a/weed/storage/erasure_coding/ec_context.go +++ b/weed/storage/erasure_coding/ec_context.go @@ -41,4 +41,3 @@ func (ctx *ECContext) ToExt(shardIndex int) string { func (ctx *ECContext) String() string { return fmt.Sprintf("%d+%d (total: %d)", ctx.DataShards, ctx.ParityShards, ctx.TotalShards) } - diff --git a/weed/storage/erasure_coding/ec_volume.go b/weed/storage/erasure_coding/ec_volume.go index 5c7647932..ce94d741b 100644 --- a/weed/storage/erasure_coding/ec_volume.go +++ b/weed/storage/erasure_coding/ec_volume.go @@ -41,7 +41,7 @@ type EcVolume struct { ecjFileAccessLock sync.Mutex diskType types.DiskType datFileSize int64 - ExpireAtSec uint64 //ec volume destroy time, calculated from the ec volume was created + ExpireAtSec uint64 //ec volume destroy time, calculated from the ec volume was created ECContext *ECContext // EC encoding parameters }