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

Gracefully handle "malformed disk image" error #214

Open
gmale opened this issue Feb 10, 2021 · 0 comments
Open

Gracefully handle "malformed disk image" error #214

gmale opened this issue Feb 10, 2021 · 0 comments

Comments

@gmale
Copy link
Contributor

gmale commented Feb 10, 2021

When working with SQLite one of the worst errors a user can encounter is a "malformed disk image." There are many causes, including known bugs in SQLite. Often, the data is actually fine and usable.

This ticket is to track work for finding ways to gracefully work around this situation.

  • Some type of database export logic might work
    • export the db to a file, delete the DB, then recreate it from the export
  • The ability to pause the synchronizer so that a corrective action can be taken without the DBs being accessed
    • perhaps we just prevent access to the datadb yet allow caching to still occur
  • copying the DB file might work (but probably not but it's worth a try)
  • add some sort of fast re-scan, where we know which blocks we cared about, before, so we can take some shortcuts
    • this might be more difficult to do once we're deleting the cached blocks but we could maintain a secondary database of just metadata for primitives
  • consider adding an "export DB" option that allows the user to grab their DB file out of the app. This would work similar to logs and potentially allow the DB to submitted for troubleshooting or recovery.

As the data access API evolves, we should explore more options in this area.

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

No branches or pull requests

1 participant