From 2c980fb4680f176709c45e678c5e4feb7ba9243f Mon Sep 17 00:00:00 2001 From: qzhello <951012707@qq.com> Date: Sat, 4 Jul 2026 01:47:14 +0800 Subject: [PATCH] fix(shell): pass collection in ec.shard.unmount --delete request (#10219) --- weed/shell/command_ec_shard_unmount.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/weed/shell/command_ec_shard_unmount.go b/weed/shell/command_ec_shard_unmount.go index 746575ec5..ee2659049 100644 --- a/weed/shell/command_ec_shard_unmount.go +++ b/weed/shell/command_ec_shard_unmount.go @@ -24,6 +24,7 @@ const ( type ecShard struct { ShardID uint32 + Collection string NodeAddress string } @@ -173,6 +174,7 @@ func (c *commandEcShardUnmount) liveShardsForVolume() []*ecShard { for _, sid := range sinfo.Ids() { shards = append(shards, &ecShard{ ShardID: uint32(sid), + Collection: eci.GetCollection(), NodeAddress: nodeAddress, }) } @@ -264,8 +266,9 @@ func (c *commandEcShardUnmount) unmountShard(s *ecShard) error { if c.delete { c.write("Deleting shard %v for volume ID %d...\n", s, c.volumeID) if _, err := vsc.VolumeEcShardsDelete(ctx, &volume_server_pb.VolumeEcShardsDeleteRequest{ - VolumeId: c.volumeID, - ShardIds: []uint32{s.ShardID}, + VolumeId: c.volumeID, + Collection: s.Collection, + ShardIds: []uint32{s.ShardID}, }); err != nil { return err }