diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2025-12-09 12:34:39 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-09 12:34:39 -0800 |
| commit | 5c2752250745fb4c2a7a288dee8c04b8b02ecdb1 (patch) | |
| tree | 0441d8e8b43c9f1c1ab8ee46429d455b5baa0a36 /test/postgres/validate-setup.sh | |
| parent | 40eee23be9b9e45efdbd07dcae45b4c540e7031d (diff) | |
| download | seaweedfs-5c2752250745fb4c2a7a288dee8c04b8b02ecdb1.tar.xz seaweedfs-5c2752250745fb4c2a7a288dee8c04b8b02ecdb1.zip | |
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
Diffstat (limited to 'test/postgres/validate-setup.sh')
0 files changed, 0 insertions, 0 deletions
