aboutsummaryrefslogtreecommitdiff
path: root/weed/admin/dash/cluster_topology.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2025-08-02 02:16:49 -0700
committerGitHub <noreply@github.com>2025-08-02 02:16:49 -0700
commit9d013ea9b8edbd6cf3030730a8a0ab02d00a47da (patch)
treec7a78ef6e2e9ed5784b58568a89d9c86fff8e569 /weed/admin/dash/cluster_topology.go
parent3d4e8409a53cf8103c9b93e2fde13be8e8652a25 (diff)
downloadseaweedfs-9d013ea9b8edbd6cf3030730a8a0ab02d00a47da.tar.xz
seaweedfs-9d013ea9b8edbd6cf3030730a8a0ab02d00a47da.zip
Admin UI: include ec shard sizes into volume server info (#7071)
* show ec shards on dashboard, show max in its own column * master collect shard size info * master send shard size via VolumeList * change to more efficient shard sizes slice * include ec shard sizes into volume server info * Eliminated Redundant gRPC Calls * much more efficient * Efficient Counting: bits.OnesCount32() uses CPU-optimized instructions to count set bits in O(1) * avoid extra volume list call * simplify * preserve existing shard sizes * avoid hard coded value * Update weed/storage/erasure_coding/ec_volume_info.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update weed/admin/dash/volume_management.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update ec_volume_info.go * address comments * avoid duplicated functions * Update weed/admin/dash/volume_management.go Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * simplify * refactoring * fix compilation --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Diffstat (limited to 'weed/admin/dash/cluster_topology.go')
-rw-r--r--weed/admin/dash/cluster_topology.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/weed/admin/dash/cluster_topology.go b/weed/admin/dash/cluster_topology.go
index 2bac7145e..8c25cc2ac 100644
--- a/weed/admin/dash/cluster_topology.go
+++ b/weed/admin/dash/cluster_topology.go
@@ -76,6 +76,13 @@ func (s *AdminServer) getTopologyViaGRPC(topology *ClusterTopology) error {
totalSize += int64(volInfo.Size)
totalFiles += int64(volInfo.FileCount)
}
+
+ // Sum up EC shard sizes
+ for _, ecShardInfo := range diskInfo.EcShardInfos {
+ for _, shardSize := range ecShardInfo.ShardSizes {
+ totalSize += shardSize
+ }
+ }
}
vs := VolumeServer{