Repository navigation
Conversation
This branch has not been deployed
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
DO clients that share a SyftBox folder share one on-disk hash cache, and a sync recorded a change as seen before it sent the change. A peer that the version gate skipped, or whose upload failed, never got the change. This PR keeps each change pending per peer until the upload to that peer succeeds.
Changes
do.sync()sent nothing.cache/owner_pending_deliveries.json, and clears it after the upload to that peer succeedsPersistedDict.update_entry: read-modify-write under one exclusive lockTesting
tests/unit/test_persisted_cache.py: a second DO process (syft-bg) syncs first and skips the peer, fails the upload, defers a deletion, or hits a read error; the peer still ends up with the right state. All four fail without the fixAsana task