Repository navigation
feat(engine): compute_extras for parallel deterministic delete (#2255) - #4262
Merged
Merged
Conversation
Phase 1 of the parallel-deterministic-delete pipeline: a pure function that lists a destination directory, set-subtracts entries present in the corresponding flist segment, and classifies surviving entries by kind so the caller can wrap them in a DeletePlan, sort to upstream emission order, and publish to the DeletePlanMap. Mirrors upstream rsync 3.4.1 generator.c:272-347 (delete_in_dir) basename-keyed set subtraction against the active flist via flist_find_ignore_dirness. Symlinks classify by symlink_metadata so they map to DeleteEntryKind::Symlink instead of the link target type. Hardlink-cohort tagging is left to task DDP-D2; entries here always carry hardlink_cohort: None. Cross-platform: device/FIFO/socket classification gated to Unix via FileTypeExt; on Windows non-dir, non-symlink entries collapse to DeleteEntryKind::File matching upstream's fallback behaviour.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
#4262) Phase 1 of the parallel-deterministic-delete pipeline: a pure function that lists a destination directory, set-subtracts entries present in the corresponding flist segment, and classifies surviving entries by kind so the caller can wrap them in a DeletePlan, sort to upstream emission order, and publish to the DeletePlanMap. Mirrors upstream rsync 3.4.1 generator.c:272-347 (delete_in_dir) basename-keyed set subtraction against the active flist via flist_find_ignore_dirness. Symlinks classify by symlink_metadata so they map to DeleteEntryKind::Symlink instead of the link target type. Hardlink-cohort tagging is left to task DDP-D2; entries here always carry hardlink_cohort: None. Cross-platform: device/FIFO/socket classification gated to Unix via FileTypeExt; on Windows non-dir, non-symlink entries collapse to DeleteEntryKind::File matching upstream's fallback behaviour.
oferchen
added a commit
that referenced
this pull request
May 18, 2026
#4262) Phase 1 of the parallel-deterministic-delete pipeline: a pure function that lists a destination directory, set-subtracts entries present in the corresponding flist segment, and classifies surviving entries by kind so the caller can wrap them in a DeletePlan, sort to upstream emission order, and publish to the DeletePlanMap. Mirrors upstream rsync 3.4.1 generator.c:272-347 (delete_in_dir) basename-keyed set subtraction against the active flist via flist_find_ignore_dirness. Symlinks classify by symlink_metadata so they map to DeleteEntryKind::Symlink instead of the link target type. Hardlink-cohort tagging is left to task DDP-D2; entries here always carry hardlink_cohort: None. Cross-platform: device/FIFO/socket classification gated to Unix via FileTypeExt; on Windows non-dir, non-symlink entries collapse to DeleteEntryKind::File matching upstream's fallback behaviour.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
#4262) Phase 1 of the parallel-deterministic-delete pipeline: a pure function that lists a destination directory, set-subtracts entries present in the corresponding flist segment, and classifies surviving entries by kind so the caller can wrap them in a DeletePlan, sort to upstream emission order, and publish to the DeletePlanMap. Mirrors upstream rsync 3.4.1 generator.c:272-347 (delete_in_dir) basename-keyed set subtraction against the active flist via flist_find_ignore_dirness. Symlinks classify by symlink_metadata so they map to DeleteEntryKind::Symlink instead of the link target type. Hardlink-cohort tagging is left to task DDP-D2; entries here always carry hardlink_cohort: None. Cross-platform: device/FIFO/socket classification gated to Unix via FileTypeExt; on Windows non-dir, non-symlink entries collapse to DeleteEntryKind::File matching upstream's fallback behaviour.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
compute_extras(dest_dir, segment_entries) -> io::Result<Vec<DeleteEntry>>incrates/engine/src/delete/extras.rs: phase 1 of the parallel-deterministic-delete pipeline (DDP-B1, Remove system rsync delegation for server mode #2255).DeletePlan, sort viaDeletePlan::sort_by_name, and publish toDeletePlanMap.generator.c:272-347(delete_in_dir) basename-keyed lookup against the active flist viaflist_find_ignore_dirness.hardlink_cohort: None.Implementation Notes
fs::symlink_metadataso they classify asDeleteEntryKind::Symlinkrather than the link target's type.cfg(unix)viaFileTypeExt; on Windows non-dir, non-symlink entries fall through toDeleteEntryKind::Filematching upstream's "anything else counts as a regular deletion" fallback.flist_findwould not match them either).Vecis intentionally unsorted; ordering is the caller's responsibility viaDeletePlan::sort_by_name.Test Plan
cargo fmt --allTests added in
extras.rs:empty_dest_and_empty_segment_yields_no_extrasentries_present_in_segment_are_excludedsegment_with_full_paths_still_matches_on_basenamedest_only_entries_all_become_extrasclassifies_regular_file_directory_and_symlinkclassifies_fifo_as_special(Unix-only, mkfifo)nonexistent_dest_returns_not_foundresults_are_deterministic_set_across_runsignores_segment_entries_with_empty_path