Conversation
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.
This pull request introduces robust, preemptive disk-space checks to the filesync protocol, ensuring that both client and server verify sufficient disk space before starting a sync. If insufficient space is detected, the sync is aborted early and the other side is notified, preventing partial transfers and unclear errors. Additionally, the handling and reporting of conflict copies during sync are improved.
Disk-space checking and error handling:
Added preemptive disk-space checks on both the client and server before file transfer begins, using new helpers
check_disk_spaceandavailable_disk_spaceincommon.rs. If not enough space is available, a newInsufficientDiskSpaceprotocol message is sent and the sync is aborted. [1] [2] [3] [4] [5] [6] [7] [8]Both client and server now handle incoming
InsufficientDiskSpacemessages gracefully, surfacing clear errors to the user/operator and aborting the session cleanly. [1] [2] [3] [4]Conflict copy reporting improvements:
BundleAppliedstruct now tracks conflict copies, and all relevant functions log and broadcast these events. [1] [2] [3] [4] [5] [6] [7]Refactoring and API changes:
engine.apply_bundleis now unpacked to obtain the count of written files, aligning with new conflict tracking. [1] [2]Dependency update:
fs2crate as a dependency for cross-platform disk space queries.