Files
seaweedFS/weed/server
Chris Lu ef28f49ec3 fix: correctly detect missing source file during volume copy (#7784)
* fix: correctly detect missing source file during volume copy

The previous fix (commit 5c27522) incorrectly used progressedBytes == 0 to
detect if the source file didn't exist. This was wrong because it would also
delete files when the source file exists but is empty.

This fix:
1. Server side: Send ModifiedTsNs even for empty files, so the client knows
   the source file exists
2. Client side: Check modifiedTsNs == 0 instead of progressedBytes == 0 to
   determine if source file didn't exist

Now the logic correctly handles:
- Source file doesn't exist → No ModifiedTsNs sent → Remove empty file
- Source file exists but is empty → ModifiedTsNs sent → Keep empty file
- Source file exists with content → ModifiedTsNs sent → Keep file with content

Fixes #7777

* Update weed/server/volume_grpc_copy.go

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-12-15 22:38:28 -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