Tags: creatigent/dqlite
Tags
vfs: Set the byte order bit in the WAL header to match host's arch SQLite calculates checksums for the WAL header and frames either using little endian or big endian byte order when adding up 32-bit words. The byte order that should be used is recorded in the WAL file header by setting the least significant bit of the magic value stored in the first 32 bits. This allows portability of the WAL file across hosts with different native byte order. When creating a brand new WAL file, SQLite will set the byte order bit to match the host's native byte order, so checksums are a bit more efficient. In Dqlite the WAL file image is always generated at run time on the host, so we can always use the native byte order.
PreviousNext