PThorpe92
693b71449e
Clean up writev batching and apply suggestions
2025-07-30 19:42:53 -04:00
PThorpe92
ef69df7258
Apply review suggestions
2025-07-30 19:42:53 -04:00
PThorpe92
73882b97d6
Remove unnecessary collecting CQEs into an array in run_once, comments
2025-07-30 19:42:53 -04:00
PThorpe92
efcffd380d
Clean up io_uring writev implementation, add iovec and cqe cache
2025-07-30 19:42:52 -04:00
PThorpe92
b8e6cd5ae2
Fix taking page content from cached pages in checkpoint loop
2025-07-30 19:42:51 -04:00
PThorpe92
0f94cdef03
Fix io_uring pwritev to properly handle partial writes
2025-07-30 19:42:50 -04:00
PThorpe92
88445328a5
Handle partial writes for pwritev calls in io_uring and fix JS bindings
2025-07-30 19:42:50 -04:00
PThorpe92
62f004c898
Fix write counter for writev batching in checkpoint
2025-07-30 19:42:49 -04:00
PThorpe92
7b2163208b
batch backfilling pages when checkpointing
2025-07-30 19:42:48 -04:00
Jussi Saurio
975b7b5434
wal: fix test incorrect expectation
2025-07-30 15:53:13 +03:00
Jussi Saurio
af660326d8
finish_append_frames_commit: revert bumping readmark incorrectly
2025-07-30 15:53:01 +03:00
Jussi Saurio
43d1321033
ignore completion result of self.read_frame
2025-07-30 14:58:03 +03:00
Jussi Saurio
9a63425b43
clippy
2025-07-30 14:58:03 +03:00
Jussi Saurio
772b71963e
finish_append_frames_commit: properly increase readmark on commit
2025-07-30 14:58:03 +03:00
Jussi Saurio
1562c1df10
begin_read_tx: better assertion failure message
2025-07-30 14:58:03 +03:00
PThorpe92
4dc15492d8
Integrate changes from tx isolation commits from @jussisaurio
2025-07-30 14:10:12 +03:00
PThorpe92
2c3a9fe5ef
Finish wal transaction handling and add more wal and chkpt testing
2025-07-30 14:10:10 +03:00
PThorpe92
8806b77d26
Clear snapshot and readmark/lock index flags on failure
2025-07-30 14:09:18 +03:00
PThorpe92
d702e6a80c
Polish checkpointing and fix tests, add documentation
2025-07-30 14:08:53 +03:00
PThorpe92
8ec99a9143
Remove assert for !NO_LOCK_HELD, properly handle writing header if reset
2025-07-30 14:08:51 +03:00
PThorpe92
529cc14e29
Fix wal tests remove unwrap from previous Result return val
2025-07-30 14:08:33 +03:00
PThorpe92
7640535ba4
Fix transaction read0 shortcut in WAL and track whether we have snapshot
2025-07-30 14:08:33 +03:00
PThorpe92
ff1987a45c
Temporarily remove optimization for new read tx to grab read mark 0 and skip db file
2025-07-30 14:08:33 +03:00
PThorpe92
318bfa9590
Change incorrect comments and rename guard
2025-07-30 14:08:33 +03:00
PThorpe92
1490a586b1
Apply suggestions/fixes and add extensive comments to wal chkpt
2025-07-30 14:08:33 +03:00
PThorpe92
3db72cf111
Just forget Full checkpoint mode for now, comment out compat test
2025-07-30 14:08:33 +03:00
PThorpe92
49f90980d4
Create new header after truncation chkpt
2025-07-30 14:08:33 +03:00
PThorpe92
b214c3dfc8
Add diff chkpt modes to sqlite3 api, finish checkpoint logic and add tests
2025-07-30 14:08:33 +03:00
PThorpe92
eaa6f99fa8
Hold and ensure release of proper locks if we trunc the db file post-checkpoint
2025-07-30 14:08:33 +03:00
PThorpe92
8ca37b71b6
Ensure we properly hold and release read locks in log restart method and fix tests
2025-07-30 14:08:33 +03:00
PThorpe92
9b7e5ed292
Trunc db file after backfilling everything in calling method
2025-07-30 14:08:33 +03:00
PThorpe92
1a9b7ef76e
Add support for truncate, restart and full checkpointing methods
2025-07-30 14:08:31 +03:00
PThorpe92
ad286bb873
Use new wait_for_completion for sync IO
2025-07-30 14:07:04 +03:00
PThorpe92
9c75872827
Make writing wal header able to be sync
2025-07-30 14:05:18 +03:00
PThorpe92
dcf346b9b0
Update apparently very old branch to new api
2025-07-30 13:48:05 +03:00
PThorpe92
edbc29e2a6
Add restart_header and truncate for WAL and tests to prep for truncate checkpoint mode
2025-07-30 13:48:05 +03:00
pedrocarlo
6edf65f752
append_frame should return a Completion
2025-07-29 11:49:10 -03:00
pedrocarlo
be3793e9f1
begin_write_wal_header should return completion + wait for completion in new_shared
2025-07-29 11:45:44 -03:00
pedrocarlo
5861145fb4
read_frame should return a Completion
2025-07-29 11:40:53 -03:00
pedrocarlo
3831e0db39
convert must_use compile warnings to unused_variables to track locations where we need to refactor in the future
2025-07-28 16:09:26 -03:00
pedrocarlo
d30c7d54c8
change all Arc<Completion> to Completion
2025-07-28 15:32:45 -03:00
pedrocarlo
28d6245440
begin_write_btree_page should return completion
2025-07-28 15:31:42 -03:00
PThorpe92
e6737d923d
Return correct value for pragma checkpoint
2025-07-26 23:09:40 -04:00
PThorpe92
fb611390c0
Update test to use realistic expectations for should_checkpoint in cacheflush
2025-07-26 23:03:51 -04:00
PThorpe92
7c027fed8c
Keep should_checkpoint logic for now until greater checkpointing is fixed
2025-07-26 23:03:51 -04:00
PThorpe92
6644036be4
Stop checkpointing after every write when wal frame size > threshold
2025-07-26 23:03:47 -04:00
Pere Diaz Bou
46f5609fce
Merge 'Append WAL frames one by one' from Pere Diaz Bou
...
Let's make sure we don't end up in a weird situation by appending frames
one by one and we can later think of optimizations.
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com >
Closes #2034
2025-07-24 16:44:51 +02:00
Pere Diaz Bou
14de7c55af
set connection state to None in vdbe rollback
2025-07-24 15:29:21 +02:00
Pere Diaz Bou
5f8e386b48
reset internal states on rollback
2025-07-24 15:29:06 +02:00
Jussi Saurio
37955e9a04
Pager/WAL: fix not clearing stale page cache
...
SQLite behavior is: if another connection has modified the DB when a
read tx starts, it must clear its page cache due to the potentiality
of there being stale versions of pages in it.
In the future, we may want to do either:
1. a more granular invalidation logic for per-conn cache, or
2. a shared versioned page cache
But right now we must follow SQLite to make our current behavior not
corrupt data
2025-07-24 16:23:12 +03:00