Open psarna opened 1 year ago
I just saw bottomless-cli
failed to restore a backup created with:
turso db shell http://localhost:8080/ 'create table t(id);'
for x in {1..32}; do turso db shell http://localhost:8080/ 'insert into t values (random());'; done
It has 30-something WAL frames backed up, and fails to verify the checksums. However, with LIBSQL_BOTTOMLESS_VERIFY_CRC=false
the verification passes, and matches the local db contents.
Description of the original SQLite WAL checksumming algorithm: https://www.sqlite.org/fileformat.html#checksum_algorithm
Now, our checksumming implementation is here: https://github.com/tursodatabase/libsql/blob/508ee178007106f9862172ba894500b476b6da85/bottomless/src/wal.rs#L244
Two things I find confusing:
checksum_be
, but I don't see how it uses big-endian and not just host endianness. Can somebody clarify?