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
PThorpe92
9c75872827
Make writing wal header able to be sync
2025-07-30 14:05:18 +03:00
pedrocarlo
a1c5a6efae
begin_sync should return a Completion
2025-07-29 13:40:58 -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
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
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
PThorpe92
b08c465450
Fix writing wal header for async IO
2025-07-27 21:52:13 -04:00
Glauber Costa
b8ee38868d
implement the pragma encoding
...
Do not allow setting it. That ship has sailed around 2005.
2025-07-26 19:37:39 -05:00
Pere Diaz Bou
8150a72550
check frame number is not 0
...
clippy
fmt
fix after rebase
clippy
2025-07-24 17:30:17 +02:00
Pere Diaz Bou
2ae3b3004e
ignore wal frames after bad checksum
...
SQLite basically ignores bad frames instead of panicking, let's try to
do the same.
2025-07-24 15:11:35 +02:00
Nikita Sivukhin
3d2a38eb88
add simple helper
2025-07-24 11:49:39 +04:00
Nikita Sivukhin
4a80306705
fix wal insert frame raw API
...
- we need to properly mark pages as dirty after insertion
2025-07-24 11:49:39 +04:00
Nikita Sivukhin
bf2bfbe978
fix clippy
2025-07-23 11:31:00 +04:00
Nikita Sivukhin
16763e1500
implement raw WAL write api
2025-07-23 11:30:59 +04:00
Nikita Sivukhin
d617d1d21e
fix raw read frame WAL API
2025-07-22 16:21:04 +04:00
Jussi Saurio
2967fafe73
Merge 'Usable space unwrap' from Pedro Muniz
...
Using `unwrap_or_default` can make `page_size` become 0 in this case,
which can lead to subtracting with overflow in `payload_threshold_max`
in case we have some sort of error. Better to unwrap the error here, as
in release mode we may not have overflow checks enabled to catch this.
Closes #2145
2025-07-21 00:23:06 +03:00
Iaroslav Zeigerman
5d47502e3a
Avoid redundant decoding of record headers when reading sorted chunk files
2025-07-19 06:08:27 +02:00
pedrocarlo
28ae96f49f
remove confusing casting from usize -> u16 -> usize for usable space
2025-07-18 11:36:50 -03:00
Jussi Saurio
347a9152a6
Merge 'Replace verbose IO Completion methods with helpers' from Preston Thorpe
...
one of the last remnants of some original verbosity
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com >
Closes #2156
2025-07-18 10:52:17 +03:00
Iaroslav Zeigerman
20bdbd5ca5
address suggestions
2025-07-18 07:28:37 +02:00
Iaroslav Zeigerman
78f3bf3475
Core: Introduce external sorting
2025-07-18 07:28:36 +02:00
PThorpe92
dced94aec6
Replace verbose completions with new helpers
2025-07-17 23:47:21 -04:00
pedrocarlo
c15f1e02d3
make most instrumentation levels to be Debug or Trace instead. Span creation in debug mode is very slow and impacts our ability to run the Simulator fast enough
2025-07-17 16:48:24 -03:00
pedrocarlo
7b8eec90bd
edit state machine in Btree for freeing pages + Pager state machine for free_page
2025-07-17 12:24:43 -03:00
pedrocarlo
dc5f73887e
refactor to require Arc<Completion> in file traits so that we can delay IO calls correctly
2025-07-17 12:24:43 -03:00
meteorgan
a6faab17e9
fix query page size
2025-07-15 16:34:07 +08:00
meteorgan
cf126824de
Support set page size
2025-07-15 16:34:07 +08:00
Pekka Enberg
1a0d618a41
Merge 'Assert I/O read and write sizes' from Pere Diaz Bou
...
Let's assert **for now** that we do not read/write less bytes than
expected. This should be fixed to retrigger several reads/writes if we
couldn't read/write enough but for now let's assert.
Closes #2078
2025-07-14 12:22:18 +03:00
Pere Diaz Bou
340391538a
io: change comment for assert
2025-07-14 10:36:06 +02:00
Pere Diaz Bou
88ff218810
io: assert small I/O
...
Let's assert **for now** that we do not read/write less bytes than
expected. This should be fixed to retrigger several reads/writes if we
couldn't read/write enough but for now let's assert.
2025-07-14 10:19:41 +02:00
Nikita Sivukhin
f61d733dd3
make new functions dependend on "json" Cargo feature
2025-07-14 11:26:51 +04:00
Nikita Sivukhin
c9e7271eaf
properly pass subtype
2025-07-14 11:20:49 +04:00
Nikita Sivukhin
81cd04dd65
add bin_record_json_object and table_columns_json_array functions
2025-07-14 11:19:45 +04:00
Krishna Vishal
b1f27cad94
chore: fix clippy
2025-07-14 03:28:55 +05:30
Krishna Vishal
e7e5f28c0a
chore: Clippy chill
2025-07-14 03:28:54 +05:30
Krishna Vishal
9b315d1d7e
Manually inline the record deserialization code for performance.
...
This is done because the compiler is refusing to inline even after
adding inline hint.
- Get refvalues from directly from registers without using
`make_record`
2025-07-14 03:28:54 +05:30
Krishna Vishal
860de412d9
Add num_columns to BTreeCursor so we can initialize
...
`Vecs` inside `RecordCursor` to their appropriate to reduce
allocations.
2025-07-14 03:28:54 +05:30
Krishna Vishal
ef147181c2
Working version of the incremental column and "optimal" record
...
compare functions. Now we optimize them
2025-07-14 03:28:54 +05:30
Krishna Vishal
0b1ed44c1f
Add optimized index record compare methods
...
compare_records_int
compare_records_string
compare_records_generic
comapre_records_generic will still be more efficient than compare-
_immutable because it deserializes the record column by column
2025-07-14 03:28:54 +05:30
Nils Koch
1a91966c7e
fix clippy errors for rust 1.88.0 (manual fix)
2025-07-12 18:58:55 +03:00
Nils Koch
828d4f5016
fix clippy errors for rust 1.88.0 (auto fix)
2025-07-12 18:58:41 +03:00
Jussi Saurio
59b4f1310b
sqlite3_ondisk: add some size constants
2025-07-10 15:16:37 +03:00
Pekka Enberg
7a259957ac
Merge 'properly set last_checksum after recovering wal' from Pere Diaz Bou
...
We store `last_checksum` to do cumulative checksumming. After reading
wal for recovery, we didn't set last checksum properly in case there
were no frames so this cause us to not initialize last_checksum
properly.
Reviewed-by: Jussi Saurio <jussi.saurio@gmail.com >
Closes #2030
2025-07-10 13:54:15 +03:00
Pere Diaz Bou
9258d33d8b
properly set last_checksum after recovering wal
...
We store `last_checksum` to do cumulative checksumming. After reading
wal for recovery, we didn't set last checksum properly in case there
were no frames so this cause us to not initialize last_checksum
properly.
2025-07-10 12:15:00 +02:00
Jussi Saurio
0eeabbb748
Merge 'btree/chore: remove unnecessary parameters to .cell_get()' from Jussi Saurio
...
we were providing the same damn arguments to `.cell_get()` and
`.cell_get_raw_region()` over and OVER and **OVER** and `O V E R`
Reviewed-by: Preston Thorpe (@PThorpe92)
Closes #2021
2025-07-10 12:22:37 +03:00
Jussi Saurio
c2b699c356
btree: make cell field names consistent
2025-07-09 23:43:03 +03:00
Jussi Saurio
641df7d7e9
improve my mental health by finally refactoring .cell_get()
2025-07-09 19:15:05 +03:00