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
7240d7903c
fmt
2025-07-30 18:22:17 +03:00
Jussi Saurio
c00d1fcfc0
fmt
2025-07-30 17:21:29 +03:00
Jussi Saurio
66c4b44c55
pager: call rollback() after ending txn so that read lock info is not lost when ending txn
2025-07-30 17:21:19 +03:00
Jussi Saurio
7b1f04dc5e
pager: only ROLLBACK your own transaction, not if someone else is writing
2025-07-30 17:00:38 +03:00
Jussi Saurio
b1aa13375d
call pager.end_tx() everywhere instead of pager.rollback()
2025-07-30 16:39:38 +03: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
3e75444388
Remove panic in cacheflush io.block in pager now that checkpoitns can return busy
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
PThorpe92
272a63b562
Fix truncate impl in JS bindings
2025-07-30 13:48:05 +03:00
PThorpe92
73fe4ffa06
Add truncate method to DatabaseStorage trait
2025-07-30 13:48:05 +03:00
pedrocarlo
a1c5a6efae
begin_sync should return a Completion
2025-07-29 13:40:58 -03:00
pedrocarlo
58b51e036d
read_page should return a Completion
2025-07-29 12:42:36 -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
Pekka Enberg
8adc807cd7
Merge 'Change function signatures to return IO Completions' from Pedro Muniz
...
Changes a couple of function signatures to return `Completion`. Also, I
changed `Completion` to be internally `Arc` to abstract the `Arc`
implementation detail, and to be able to attach a `#[must_use]` to the
`Completion` struct, so that cargo check can show us where we are not
tracking completions in the code. I also attached a `#[must_use]` to
`IOResult` so that we can see the places that we are not propagating or
waiting for I/O, demonstrating locations where functions should be
reentrant and are not.
Also, while we are with this refactor in progress I want to relax the
Clippy CI lint on unused_variables.
Closes #2309
2025-07-29 12:41:14 +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
7789c569a0
make Completion implementation contain an inner Arc<CompletionInner> so that we can must_use the Completion struct
2025-07-28 15:31:42 -03:00
pedrocarlo
617254116d
begin_read_page should return completions
2025-07-28 15:31:42 -03:00
pedrocarlo
28d6245440
begin_write_btree_page should return completion
2025-07-28 15:31:42 -03:00