Files
seaweedFS/weed/server
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
..
2019-03-03 10:17:44 -08:00
2024-08-01 13:00:54 -07:00
2025-09-18 14:46:53 -07:00