Skip to content
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

Tell system to reinitialize when it refuses to give us data we need #845

Open
wants to merge 1 commit into
base: android15
Choose a base branch
from

Conversation

grote
Copy link
Collaborator

@grote grote commented Jan 10, 2025

Another hacky workaround to fix a hacky workaround.

We had talked to Google about the backup API not getting notified when essential K/V apps like @pm@ don't have new data for backup. The only option they offered is BackupMonitor which gets the information at least, but out of process on another thread.

So we implemented a hacky workaround where BackupMonitor tells SnapshotCreator to extract backup data from an old snapshot.

Unfortunately, it is possible that we do a backup run which includes @pm@, but encounters an error later, so the system cancels the entire backup which causes us not to have @pm@ data in a snapshots for re-use. Still, the system thinks we backed up @pm@ and doesn't give us its data.

Closes #818

@grote grote requested a review from t-m-w January 10, 2025 16:48
@grote
Copy link
Collaborator Author

grote commented Jan 10, 2025

Draft, only because based on #835.

One way to test this is to do a backup, then manually remove all existing snapshots from the backend. Then restart the Seedvault process and do another backup and watch the log for No latest snapshot! Initializing transport... and see if the backup succeeds.

Another hacky workaround to fix a hacky workaround.

We had talked to Google about the backup API not getting notified when essential K/V apps like @pm@ don't have new data for backup. The only option they offered is BackupMonitor which gets the information at least, but out of process on another thread.

 So we implemented a hacky workaround where BackupMonitor tells SnapshotCreator to extract backup data from an old snapshot.

 Unfortunately, it is possible that we do a backup run which includes @pm@, but encounters an error later, so the system cancels the entire backup which causes us not to have @pm@ data in a snapshots for re-use. Still, the system thinks we backed up @pm@ and doesn't give us its data.
@grote grote force-pushed the no-data-no-snapshot branch from eaee625 to f4b32e4 Compare January 21, 2025 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error finishing backup: IllegalStateException: No metadata for @pm@
1 participant