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

Fixes to the backup import #5086

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Fixes to the backup import #5086

wants to merge 3 commits into from

Conversation

iequidoo
Copy link
Collaborator

@iequidoo iequidoo commented Dec 6, 2023

See commit messages.

Also need to think how to add at least some tests for this.

@iequidoo iequidoo force-pushed the iequidoo/import_backup branch 2 times, most recently from f3effee to 71f8626 Compare December 6, 2023 00:32
@iequidoo iequidoo marked this pull request as ready for review December 6, 2023 00:51
@iequidoo iequidoo requested review from link2xt and flub December 6, 2023 00:51
src/sql.rs Show resolved Hide resolved
Copy link
Member

@flub flub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

High level looks fine. I didn't review the code detailed though, if you'd like me to I can on Monday when I have a full-size computer for it

src/sql.rs Show resolved Hide resolved
This way we can't get an account with missing blobs if there's not enough disk space.

Also delete already unpacked files if all files weren't unpacked successfully. Still, there are some
minor problems remaining:
- If a db wasn't imported successfully, unpacked blobs aren't deleted because we don't know at which
  step the import failed and whether the db will reference the blobs after a restart.
- If `delete_and_reset_all_device_msgs()` fails, the whole `import_backup()` fails also, but after a
  restart delete_and_reset_all_device_msgs() isn't retried. Probably errors from it should be
  ignored at all, but let's postpone changing this for now.
Otherwise we continue to work with an incompletely imported db... but only until restart -- after
that all changes to the db are lost.
…ice_msgs()

They are not a good reason to fail the whole import. Anyway `delete_and_reset_all_device_msgs()`
isn't retried after restarting the program.
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.

None yet

2 participants