SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
purge duplicated ec shards
Chris Lu6cea23d09112
diff --git a/weed/shell/command_ec_balance.go b/weed/shell/command_ec_balance.goindex 664284df94..414f0ec4d6 100644--- a/weed/shell/command_ec_balance.go+++ b/weed/shell/command_ec_balance.go@@ -186,18 +186,20 @@ func doDeduplicateEcShards(ctx context.Context, commandEnv *commandEnv, collecticontinue}sortEcNodes(ecNodes)- fmt.Printf("ec shard %d.%d has %d copies, removing from %+v\n", vid, shardId, len(ecNodes), ecNodes[1:])+ fmt.Printf("ec shard %d.%d has %d copies, keeping %v\n", vid, shardId, len(ecNodes), ecNodes[0].info.Id)if !applyBalancing {continue}++ duplicatedShardIds := []uint32{uint32(shardId)}for _, ecNode := range ecNodes[1:] {- duplicatedShardIds := []uint32{uint32(shardId)}if err := unmountEcShards(ctx, commandEnv.option.GrpcDialOption, vid, ecNode.info.Id, duplicatedShardIds); err != nil {return err}if err := sourceServerDeleteEcShards(ctx, commandEnv.option.GrpcDialOption, collection, vid, ecNode.info.Id, duplicatedShardIds); err != nil {return err}+ ecNode.freeEcSlot++}}return nil