You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.
Snapshots sent to bottomless are just regular db files. Let's make sure that before they get sent to S3, we know that they are correct. The best way to do that that comes to my mind is to create a local connection to the database and run pragma integrity_check;.
The text was updated successfully, but these errors were encountered:
My idea was to: currently the snapshot upload comes in two parts:
Gzip db file into local disk.
Upload gzipped db file as /db.gz.
Upload change counter (which keeps [u8;4] used to compare local and remote db versions) as /.changecounter.
My idea was to change snapshotting process to:
Gzip db file - to be sure that we have enough disk space to do so.
While gzipping, compute a checksum (any one will do).
Upload gzipped db file as /db.gz.
Upload change counter AND checksum as /.changecounter. This is basically our finaliser.
Now during restore, first thing we do is always downloading remote .changecounter first and comparing it against local. With this change we can also download checksum. When we download db file, compute its checksum and verify it again against the one from .changecounter file.
Now if the checksum will fail, let's try to see if we have a .dep file which describes previous generation. If there is any let's try to recover from it instead and then potentially try to apply the WAL from current generation, skipping the damaged snapshot.
Snapshots sent to bottomless are just regular db files. Let's make sure that before they get sent to S3, we know that they are correct. The best way to do that that comes to my mind is to create a local connection to the database and run
pragma integrity_check;
.The text was updated successfully, but these errors were encountered: