Files
seaweedFS/weed
Chris Lu 5c27522507 fix: prevent empty .vif files from ec.decode causing parse errors (#7686)
* fix: prevent empty .vif files from ec.decode causing parse errors

When ec.decode copies .vif files from EC shard nodes, if a source node
doesn't have the .vif file, an empty .vif file was created on the target
node. This caused volume.configure.replication to fail with 'proto: syntax
error' when trying to parse the empty file.

This fix:
1. In writeToFile: Remove empty files when no data was written (source
   file was not found) to avoid leaving corrupted empty files
2. In MaybeLoadVolumeInfo: Handle empty .vif files gracefully by treating
   them as non-existent, allowing the system to create a proper one

Fixes #7666

* refactor: remove redundant dst.Close() and add error logging

Address review feedback:
- Remove redundant dst.Close() call since defer already handles it
- Add error logging for os.Remove() failure
2025-12-09 12:34:39 -08:00
..
2025-12-08 11:09:59 -08:00
2025-10-13 18:05:17 -07:00
2024-06-25 09:18:11 -07:00
2024-02-14 08:26:38 -08:00
2025-12-08 01:38:16 -08:00
2025-03-17 23:13:27 -07:00