Files
seaweedFS/weed/storage
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-06-16 22:25:22 -07:00
2025-10-26 22:50:37 -07:00
2023-03-08 01:48:28 -08:00
2022-11-14 00:19:27 -08:00
2025-06-30 13:57:28 -07:00
2025-06-30 10:11:30 -07:00
2019-04-17 22:04:49 -07:00
2025-06-16 22:05:06 -07:00
2025-11-10 20:30:21 -08:00
2025-06-16 22:25:22 -07:00