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

Conflict detection in WAL API #1875

Open
penberg opened this issue Dec 10, 2024 · 1 comment
Open

Conflict detection in WAL API #1875

penberg opened this issue Dec 10, 2024 · 1 comment
Labels
enhancement New feature or request WAL sync

Comments

@penberg
Copy link
Collaborator

penberg commented Dec 10, 2024

We currently allow arbitrary frames to be inserted to the WAL. Let's check the salt and the checksum to verify that a new frame matches the existing WAL. The tricky bit here is that the WAL we insert to needs to have the same salt as the origin WAL because salt is part of the cumulative checksum.

@penberg penberg added enhancement New feature or request WAL sync labels Dec 10, 2024
@penberg
Copy link
Collaborator Author

penberg commented Dec 12, 2024

We could augment the libsql_wal_frame_insert() to force the WAL to have the same salt and checksum as the first frame. However, this seems a bit intrusive to SQLite itself, so perhaps a better approach is to use external checksumming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request WAL sync
Projects
None yet
Development

No branches or pull requests

1 participant