Skip to content

test: add delay-updates sweep tests for remote transfer path - #5397

Merged
oferchen merged 7 commits into
masterfrom
feature/pir-5c-delay-updates-sweep-tests
Jun 3, 2026
Merged

oferchen merged 7 commits into
masterfrom
feature/pir-5c-delay-updates-sweep-tests

Conversation

@oferchen

@oferchen oferchen commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add handle_delayed_updates() function implementing the upstream receiver.c:422-450 bulk rename sweep for --delay-updates in the remote receiver path
  • Add delay_updates_staging_path() helper to compute .~tmp~/ staging paths
  • Add CommitOutcome struct to track staging-to-final path mappings
  • Add DELAY_UPDATES_PARTIAL_DIR constant (.~tmp~) to the disk commit config module
  • Add 15 integration tests covering the full delay-updates sweep flow

Test plan

  • CI passes fmt+clippy, nextest, Windows, macOS, Linux musl
  • Tests verify staging path computation for root, nested, and deeply nested paths
  • Tests verify single-file and multi-file rename sweep with content validation
  • Tests verify .~tmp~/ staging directory cleanup after sweep
  • Tests verify end-to-end flow through disk commit thread (chunked, whole-file, nested)
  • Tests verify sweep replaces existing destination files
  • Tests verify empty outcomes are a no-op

@github-actions github-actions Bot added the test label Jun 3, 2026
@oferchen
oferchen force-pushed the feature/pir-5c-delay-updates-sweep-tests branch from 1739860 to c414c85 Compare June 3, 2026 16:39
oferchen added 4 commits June 3, 2026 22:10
Add handle_delayed_updates() function and integration tests verifying
the --delay-updates bulk rename sweep in the disk commit layer.

The implementation mirrors upstream receiver.c:422-450 where files are
first committed to .~tmp~/ staging directories during transfer, then
renamed to their final destinations in a single sweep.

Tests cover:
- staging path computation via delay_updates_staging_path()
- single and multiple file rename sweep
- staging directory cleanup after sweep
- nested directory structures with per-directory staging
- end-to-end flow through the disk commit thread
- whole-file coalesced writes with delayed sweep
- replacement of existing destination files
- empty outcomes as no-op
@oferchen
oferchen force-pushed the feature/pir-5c-delay-updates-sweep-tests branch from d8a0023 to 7c61fb6 Compare June 3, 2026 19:11
oferchen added 3 commits June 3, 2026 22:20
Master introduced a private CommitOutcome struct in commit_file() with
fields was_copy and delayed_path. The delay-updates sweep struct used
the same name with different fields (staging_path, final_path), causing
a duplicate definition error when CI merges master into the branch.

Rename the sweep struct to DelayedUpdateEntry to disambiguate.
@oferchen
oferchen merged commit 6330118 into master Jun 3, 2026
69 of 70 checks passed
@oferchen
oferchen deleted the feature/pir-5c-delay-updates-sweep-tests branch June 4, 2026 07:13
oferchen added a commit that referenced this pull request Aug 24, 2026
* test: add delay-updates sweep tests for remote transfer path (#3462)

Add handle_delayed_updates() function and integration tests verifying
the --delay-updates bulk rename sweep in the disk commit layer.

The implementation mirrors upstream receiver.c:422-450 where files are
first committed to .~tmp~/ staging directories during transfer, then
renamed to their final destinations in a single sweep.

Tests cover:
- staging path computation via delay_updates_staging_path()
- single and multiple file rename sweep
- staging directory cleanup after sweep
- nested directory structures with per-directory staging
- end-to-end flow through the disk commit thread
- whole-file coalesced writes with delayed sweep
- replacement of existing destination files
- empty outcomes as no-op

* fix: correct off-by-one in delay_updates whole_file test data length

* style: apply cargo fmt formatting

* style: fix import ordering in disk_commit tests

* fix: rename CommitOutcome to DelayedUpdateEntry to avoid name collision

Master introduced a private CommitOutcome struct in commit_file() with
fields was_copy and delayed_path. The delay-updates sweep struct used
the same name with different fields (staging_path, final_path), causing
a duplicate definition error when CI merges master into the branch.

Rename the sweep struct to DelayedUpdateEntry to disambiguate.

* fix: resolve clippy unnecessary_lazy_evaluations lint in disk commit

* style: apply cargo fmt to disk_commit process module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant