Conversation
This commit: - Adds a feature to open databases from various WAL checkpoints. - Allows a database to be initialized with a Path OR BinaryIO. - Improves the reader by also parsing the WAL file - Adds a Python script to generate test data.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9 +/- ##
==========================================
+ Coverage 79.71% 81.91% +2.20%
==========================================
Files 30 31 +1
Lines 2282 2334 +52
==========================================
+ Hits 1819 1912 +93
+ Misses 463 422 -41
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Schamper
left a comment
There was a problem hiding this comment.
Can you move all WAL related classes to a file wal.py and lose the WAL prefix in the class names?
Co-authored-by: Erik Schamper <1254028+Schamper@users.noreply.github.com>
Co-authored-by: Erik Schamper <1254028+Schamper@users.noreply.github.com>
Co-authored-by: Erik Schamper <1254028+Schamper@users.noreply.github.com>
Co-authored-by: Erik Schamper <1254028+Schamper@users.noreply.github.com>
|
Really appreciate the effort you put into this feature @PimSanders. |
Co-authored-by: Erik Schamper <1254028+Schamper@users.noreply.github.com>
Co-authored-by: Erik Schamper <1254028+Schamper@users.noreply.github.com>
Co-authored-by: Erik Schamper <1254028+Schamper@users.noreply.github.com>
Schamper
left a comment
There was a problem hiding this comment.
Is there anything you still wanted to look at yourself? Otherwise it looks good to merge after these last comments to me.
|
Also please fix the linter. |
Co-authored-by: Erik Schamper <1254028+Schamper@users.noreply.github.com>
|
I'm all good, thanks for the reviews! |
This PR:
A WAL file and/or WAL checkpoint can be opened on initialization:
Previous WAL checkpoints might contain interesting data that has been modified or removed, for example:
If no checkpoint is specified the reader will use the latest valid data from the WAL file, if that's not available it will use the database file. If no WAL file is provided it will check if
DB.sqlite-walorDB.db-walexists.There are three things I'm not sure about and I would like your opinion on:
checkpoint_sequencecounter in the header?tests/_datawhich means it will be saved in LFS, I don't think it should be stored in LFS. Should the script stay in_dataand have an exception from LFS or should it be stored somewhere else?