Skip to content

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.

fix(shell): show planned size in fs.mergeVolumes log to clarify size limit check (#8553)

Copilot013362d2d307
diff --git a/weed/shell/command_fs_merge_volumes.go b/weed/shell/command_fs_merge_volumes.go
index 2ed2c0a61c..fc1cd160fb 100644
--- a/weed/shell/command_fs_merge_volumes.go
+++ b/weed/shell/command_fs_merge_volumes.go
@@ -244,10 +244,11 @@ func (c *commandFsMergeVolumes) createMergePlan(collection string, toVolumeId ne
fmt.Printf("volume %d is not compatible with volume %d\n", src, candidate)
continue
}
- if c.getVolumeSizeBasedOnPlan(plan, candidate)+c.getVolumeSizeById(src) > c.volumeSizeLimit {
- fmt.Printf("volume %d (%d MB) merge into volume %d (%d MB) exceeds volume size limit (%d MB)\n",
+ candidatePlannedSize := c.getVolumeSizeBasedOnPlan(plan, candidate)
+ if candidatePlannedSize+c.getVolumeSizeById(src) > c.volumeSizeLimit {
+ fmt.Printf("volume %d (%d MB) merge into volume %d (%d MB, %d MB with plan) exceeds volume size limit (%d MB)\n",
src, c.getVolumeSizeById(src)/1024/1024,
- candidate, c.getVolumeSizeById(candidate)/1024/1024,
+ candidate, c.getVolumeSizeById(candidate)/1024/1024, candidatePlannedSize/1024/1024,
c.volumeSizeLimit/1024/1024)
continue
}