Merged
Conversation
might be useful someday, easy to add back
rather than create new accounting that needs to be forwarded and managed off device, for a share, delete everything not in the manifest. this has holes but if all devices are syncing, everything should be eventually consistent. problems - old device comes online - two devices never sync with each other but sync with a remote possible mitigations: - designated "share" device - ensure sync with a 1/2 + 1 devices before share - do not process deletes more than once in a time period
this is overall a bit flaky still
to do this properly i think i need to give the sync code a channel to post events back to something in dioxus that can reload the manifest.
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.
closes #24
Minimum File Delete
Overall, the idea here is that all the mechanisms in Footnote treat the user as the source of truth. When something is deleted, a tombstone file is created. the tombstone is sync'd, similar to a file, last action wins. for sharing, the target device will take on the state of the last device to share with it. if devices are eventually consistent, targets will converge on the same view of the data. Real world testing will be needed to see if this is good enough in practice.
Notes
Tombstone cleanup
There's not yet a mechanism to delete a tombstone, though with the expected number of devices to be low, it should be possible to keep track of which devices in our device group have processed a delete. once they all have, the tombstone can be deleted. (possibly you'd need to see all X devices have the tombstone marked for removal, or see that they don't have the tombstone at all)
Additional debt cleanup
There was long standing debt from misc warnings that were not fixed to ensure file_delete got filled in. Now that file_delete is a used function, all warning were cleaned. --all-features compiles clean