Commit Graph

3695 Commits

Author SHA1 Message Date
PThorpe92
f4becd1296 Allow using !passive checkpoint methods in pragma wal_checkpoint 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
6b71efa5b6 Accept mode argument for checkpoint in connection api 2025-07-30 14:07:20 +03:00
PThorpe92
441319e774 Fix todo! in vfs IO preventing write wal header from using wait_for_completion 2025-07-30 14:07:19 +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
cfbe9d5b9e Fix clippy error casting same size 2025-07-30 13:48:05 +03:00
PThorpe92
f22313575f Fix windows method to take usize in place of u64 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
3be8bb374d Use usize for truncate method in place of u64 2025-07-30 13:48:05 +03:00
PThorpe92
ce1897cb4a Impl truncate for the remainder of IO modules 2025-07-30 13:48:05 +03:00
PThorpe92
d30157518f Impl truncate method for VFS io module and create plumbing in extension lib 2025-07-30 13:48:05 +03:00
PThorpe92
fa002cba59 Impl truncate method for io_uring IO 2025-07-30 13:48:05 +03:00
PThorpe92
a4121c8cea Impl truncate method for generic IO 2025-07-30 13:48:05 +03:00
PThorpe92
73fe4ffa06 Add truncate method to DatabaseStorage trait 2025-07-30 13:48:05 +03:00
PThorpe92
8bf2898c47 Add truncate method to IO trait and Truncate completion variant 2025-07-30 13:48:05 +03:00
Pekka Enberg
2eed2745d3 Merge 'Change more function signatures to return Completions' from Pedro Muniz
Closes #2330
2025-07-30 10:42:45 +03:00
Pekka Enberg
2443b8db3c Merge 'bindings/rust: Add Connection::execute_batch()' from Rohith Suresh
Fixes #2184

Closes #2215
2025-07-30 10:19:03 +03:00
Pekka Enberg
81c86d42b4 Merge 'Clean up conversion between InsnFunctionStepResult and StepResult' from Diego Reis
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com>

Closes #2332
2025-07-30 09:11:35 +03:00
Pekka Enberg
9ab26b3ac2 Merge 'core/mvcc: simplify mvcc cursor types' from Pere Diaz Bou
We have so many cursor types that it will be unbearable to properly make
all of them work. Let's simplify this and only focus on lazy cursor
which in the future will load from database in case we need it.

Closes #2333
2025-07-30 09:10:44 +03:00
Pere Diaz Bou
caa5fe3ef4 core/mvcc: simplify mvcc cursor types
We have so many cursor types that it will be unbearable to properly make
all of them work. Let's simplify this and only focus on lazy cursor
which in the future will load from database in case we need it.
2025-07-29 20:13:52 +02:00
Diego Reis
e0b099f5ad refactor: Implement conversion between InsnFunctionStepResult and
StepResult
2025-07-29 15:02:09 -03:00
pedrocarlo
a1c5a6efae begin_sync should return a Completion 2025-07-29 13:40:58 -03:00
pedrocarlo
9c4ce745ba wait_for_completion was not implemented for MemoryIO and VFS 2025-07-29 13:23:45 -03:00
RS2007
2587d0cc76 Removing dbg 2025-07-29 21:24:33 +05:30
RS2007
e31435e416 Typo fix 2025-07-29 21:24:33 +05:30
RS2007
282222a39f feat: execute_batch working 2025-07-29 21:24:33 +05:30
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
Nikita Sivukhin
841bbe3f77 add CDC types 2025-07-29 14:40:14 +04: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
Pekka Enberg
94e2d3a004 Merge 'perf: fix logic error in is_simple_count()' from Jussi Saurio
```
Execute `SELECT count() FROM users`/limbo_execute_select_count
                        time:   [15.635 µs 15.676 µs 15.730 µs]
                        change: [-96.011% -95.991% -95.972%] (p = 0.00 < 0.05)
                        Performance has improved.
```
Performance has improved.
Closes #2313

Closes #2314
2025-07-29 09:14:48 +03:00
Jussi Saurio
574c15b5e4 perf: fix logic error in is_simple_count() 2025-07-29 09:11:54 +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
pedrocarlo
3104e3fee5 adjust DatabaseStorage trait to return completions 2025-07-28 15:31:42 -03:00
pedrocarlo
0088e3e1a9 must_use IOResult 2025-07-28 15:31:42 -03:00
Diego Reis
bab10909c3 Disable extension loading for wasm
We should enable it later when wasm become more mature
2025-07-28 14:49:07 -03:00
Diego Reis
0346c65a72 Fix clippy 2025-07-28 14:48:52 -03:00
Pekka Enberg
e2d4cbbe48 Merge 'core: Enforce shared database object per database file' from Pekka Enberg
We need to ensures that there is a single, shared `Database` object per
a database file. We need because it is not safe to have multiple
independent WAL files open because coordination happens at process-level
POSIX file advisory locks.
Fixes #2267

Reviewed-by: Pere Diaz Bou <pere-altea@homail.com>

Closes #2299
2025-07-28 19:34:35 +03:00
Pekka Enberg
50e03ee90e core: Clean up Connection::open_with_flags()
Co-authored-by: bit-aloo <84662239+Shourya742@users.noreply.github.com>
2025-07-28 19:16:01 +03:00
Pekka Enberg
ab1a152100 core: Enforce single shared database object per database file
We need to ensures that there is a single, shared `Database` object per
a database file. We need because it is not safe to have multiple
independent WAL files open because coordination happens at process-level
POSIX file advisory locks.

Fixes #2267
Co-authored-by: ultraman <sunhuayangak47@gmail.com>
2025-07-28 19:13:53 +03:00
Pekka Enberg
9b67eb0e77 core: Fix transaction cleanup in Connection::close() 2025-07-28 19:13:53 +03:00