-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unify Storage Backends #734
Open
grote
wants to merge
12
commits into
seedvault-app:android15
Choose a base branch
from
grote:unified-backends
base: android15
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
grote
force-pushed
the
unified-backends
branch
3 times, most recently
from
August 29, 2024 12:32
c1a8bbc
to
574cca6
Compare
grote
force-pushed
the
unified-backends
branch
from
September 6, 2024 11:55
574cca6
to
6d5fc9b
Compare
This creates a KeyManager interface in the new core module which the storage module can use to get the key from.
because it is one extra request for packages that do have data and from the looks of it not really needed.
When changing backends, the ChunkWriter could still use the old one causing data loss, because chunks assumed to exist on new backend, were written to old one.
grote
force-pushed
the
unified-backends
branch
from
September 12, 2024 12:34
6d5fc9b
to
78ef0ca
Compare
I've been running this on my daily driver and haven't encountered problems. I've been seeing notifications of successful backups daily. I tested restoring a single app after making a small change - a notes app - and it appears to work fine. Haven't done full-blown testing, but haven't encountered errors, either. I use WebDAV as a backend. |
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.
We had two storage plugin interfaces: One for app backup and one for files backup. Therefore we had two different WebDAV implementations and two different Storage Access Framework implementations. The storage interface was application specific to its use-case.
This MR unifies those implementations using a single storage backend interface which is rather generic and mostly independent of application specific use cases:
This should make writing new storage backends easier. It reduces lots of duplicated code and allows for future modernizations such as retrying operations after I/O errors.
The new unified implementations also improve upon their old separate implementations. There are no more
init()
orstartRestoreSet()
methods where we created new folders. Instead, all folders are now created on-demand, only when they are needed and in the case of SAF also cached for faster access. Initializing a new backup location is faster, because we don't need to create the 255 folders for file backup.The implementation now lives in a new
core
gradle module, so theapp
and thestorage
module can both make use of it. In the future, common cryptographic code should also get moved there to further reduce duplication.