mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-20 13:30:46 +02:00
A previously aborted ec.rebuild leaves 0-byte placeholder files for the shards it was about to write. On the next attempt, findShardFile saw those ghosts as "present", the read loop returned nil on the first n==0, and rebuild claimed success while leaving the volume mounted with empty stripes — manifesting downstream as "too few shards given" or silent corruption. Now: skip 0-byte files when scanning, validate that all surviving shards agree on size, bound the read loop by that size instead of bailing on the first short read, and remove residue after a successful rebuild so it can't shadow real shards next time.