Phase 4: --preallocate #276

Closed
TapTap wants to merge 0 commits from feat/p4-preallocate into dev
Owner

Phase-4 --preallocate row (effort S). When set, the receiver allocates a destination file's full space up front (posix_fallocate preferred, ftruncate fallback on EOPNOTSUPP/ENOSYS) before streaming data, so a transfer that will overflow disk fails fast at allocation. Additive bool config field crossing the wire; PROTOCOL_VERSION 2.10.0 -> 2.11.0. Threaded through all receiver store paths (atomic, inplace, partial, delay-updates, link-dest copy fallback). Verified: STRICT_WARNINGS build clean, unit 28/28, full integration 289 passed / 11 skipped / 1 xpassed. Independent c-review APPROVE (no blockers); applied hardening fix: explicit lseek(0) before the data write so correctness does not rely on posix_fallocate leaving the file offset unchanged.

Phase-4 --preallocate row (effort S). When set, the receiver allocates a destination file's full space up front (posix_fallocate preferred, ftruncate fallback on EOPNOTSUPP/ENOSYS) before streaming data, so a transfer that will overflow disk fails fast at allocation. Additive bool config field crossing the wire; PROTOCOL_VERSION 2.10.0 -> 2.11.0. Threaded through all receiver store paths (atomic, inplace, partial, delay-updates, link-dest copy fallback). Verified: STRICT_WARNINGS build clean, unit 28/28, full integration 289 passed / 11 skipped / 1 xpassed. Independent c-review APPROVE (no blockers); applied hardening fix: explicit lseek(0) before the data write so correctness does not rely on posix_fallocate leaving the file offset unchanged.
TapTap added 1 commit 2026-09-08 18:23:51 +02:00
preallocate: --preallocate allocates dest space up front
CI / lint (pull_request) Failing after 3s
CI / build-and-test (pull_request) Skipped
CI / sanitizers (address) (pull_request) Skipped
CI / sanitizers (undefined) (pull_request) Skipped
CI / fuzz-build (pull_request) Skipped
CI / coverage (pull_request) Skipped
CI / valgrind (pull_request) Skipped
362a6a5488
Receiver allocates the destination file's full size before streaming data
(posix_fallocate preferred, ftruncate fallback on EOPNOTSUPP/ENOSYS) so an
out-of-space transfer fails fast instead of partway. Additive config bool
crossing the wire; PROTOCOL_VERSION 2.10.0 -> 2.11.0. Threaded through all
store paths (atomic, inplace, partial/delay-updates staging, link-dest copy
fallback). Review hardening: explicit lseek(0) before the data write so
correctness does not depend on posix_fallocate leaving the fd offset unchanged.
Author
Owner

Merged locally into dev (279fc84). Feature verified: STRICT_WARNINGS build clean, unit 28/28, full integration 289 passed/11 skipped/1 xpassed. Independent c-review APPROVE (no blockers); hardening fix applied (lseek(0) before data write so posix_fallocate offset behavior is not relied upon).

Merged locally into dev (279fc84). Feature verified: STRICT_WARNINGS build clean, unit 28/28, full integration 289 passed/11 skipped/1 xpassed. Independent c-review APPROVE (no blockers); hardening fix applied (lseek(0) before data write so posix_fallocate offset behavior is not relied upon).
TapTap closed this pull request 2026-09-08 18:37:54 +02:00

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TapTap/FastSync#276