-
Notifications
You must be signed in to change notification settings - Fork 80
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
Implement a auto re-trying wrapper backend #835
Conversation
f22428c
to
f41a8df
Compare
See: https://developer.android.com/develop/background-work/background-tasks/broadcasts#android-14 for why we don't get broadcasts while the system has us in cached state
We forgot the app size, so when restoring apps, their data size was unknown
So #796 is what this PR itself refers to, and the others listed are the unrelated ones? I left comments on the others, which appear fixed, but I still need to test the main issue. |
Yes.
Thanks! |
Test case 1 (with WebDAV)
Expected resultBackup retries transient failures and ultimately completes successfully.(?) Actual resultBackup claimed to finish successfully. However, during the process, the backup got stuck for a while on RHVoice while the network was not available. When using the Restore functionality, RHVoice is shown with "Last backup: Never (0 B)", but that is not the case for the previous backup - so I think although the backup "finished successfully", on the apps which failed, it gave up. Still working on replicating this. LogFull log shared privately with filename snippet
|
Re Test case 1 above: @grote and I were perplexed to see lines like |
I pushed some changes that new will retry |
|
Thanks for testing! I just added the |
Understood! The StreamResetException just came up in my first test and made it appear that this change change was ineffective until looking at logs to see why. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related issues appear to be fixed.
Quick test of backup/restore-after-wipe worked fine.
Did not encounter any breakage in real-world use or otherwise.
Data to be saved to the backend will now be kept in memory and not directly written to streams. So watch out for out of memory errors!
This allows us to keep the data available for re-tries. If a network request times out or fails in a non-permanent way, the new
RetryBackend
will automatically retry all backend operations. Over time, we can find out more transient exceptions and add them to the list. For now, we start small with few real tr-try cases.For ease of combined testing, this MR contains commits that fix unrelated issues:
Closes #796, #828, #830, #841