Repository navigation
feat: wire HardlinkApplyTracker into receiver hardlink creation path - #3066
Merged
Merged
Conversation
Replace the ad-hoc HashMap-based leader tracking in create_hardlinks() with the HardlinkApplyTracker from the engine crate. The tracker provides a reusable, tested abstraction for leader/follower resolution with support for deferred follower linking. Changes: - Add HardlinkApplyTracker field to ReceiverContext, initialized when --hard-links is active - Derive Debug on HardlinkApplyTracker for ReceiverContext compatibility - Refactor create_hardlinks() to use tracker.record_leader() and tracker.leader_path() instead of building a local HashMap - Call tracker.resolve_deferred() after linking to handle any remaining deferred followers from incremental commits - Add tests for tracker initialization, leader tracking, multi-follower groups, and state preservation across calls upstream: hlink.c:finish_hard_link(), hlink.c:hard_link_check()
oferchen
added a commit
that referenced
this pull request
May 1, 2026
…3066) * feat: wire HardlinkApplyTracker into receiver hardlink creation path Replace the ad-hoc HashMap-based leader tracking in create_hardlinks() with the HardlinkApplyTracker from the engine crate. The tracker provides a reusable, tested abstraction for leader/follower resolution with support for deferred follower linking. Changes: - Add HardlinkApplyTracker field to ReceiverContext, initialized when --hard-links is active - Derive Debug on HardlinkApplyTracker for ReceiverContext compatibility - Refactor create_hardlinks() to use tracker.record_leader() and tracker.leader_path() instead of building a local HashMap - Call tracker.resolve_deferred() after linking to handle any remaining deferred followers from incremental commits - Add tests for tracker initialization, leader tracking, multi-follower groups, and state preservation across calls upstream: hlink.c:finish_hard_link(), hlink.c:hard_link_check() * style: fix formatting in receiver hardlink tracker tests
oferchen
added a commit
that referenced
this pull request
May 5, 2026
…3066) * feat: wire HardlinkApplyTracker into receiver hardlink creation path Replace the ad-hoc HashMap-based leader tracking in create_hardlinks() with the HardlinkApplyTracker from the engine crate. The tracker provides a reusable, tested abstraction for leader/follower resolution with support for deferred follower linking. Changes: - Add HardlinkApplyTracker field to ReceiverContext, initialized when --hard-links is active - Derive Debug on HardlinkApplyTracker for ReceiverContext compatibility - Refactor create_hardlinks() to use tracker.record_leader() and tracker.leader_path() instead of building a local HashMap - Call tracker.resolve_deferred() after linking to handle any remaining deferred followers from incremental commits - Add tests for tracker initialization, leader tracking, multi-follower groups, and state preservation across calls upstream: hlink.c:finish_hard_link(), hlink.c:hard_link_check() * style: fix formatting in receiver hardlink tracker tests
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
HardlinkApplyTrackerfrom the engine crate into the receiver'screate_hardlinks()method, replacing the ad-hocHashMap<u32, PathBuf>leader tracking with a reusable, tested abstractionHardlinkApplyTrackeras an optional field onReceiverContext, initialized when--hard-linksis activetracker.resolve_deferred()after linking to handle any remaining deferred followers from incremental commitsUpstream Reference
hlink.c:finish_hard_link()- creates links for deferred followers after leader commithlink.c:hard_link_check()- defers followers when leader is in-progressTest plan
create_hardlinks_*tests pass