Pekka Enberg
de40442677
core: Remove unused import from btree.rs
2024-11-20 11:55:49 +02:00
Pere Diaz Bou
51ad827f1f
fmt
2024-11-19 17:56:24 +01:00
Pere Diaz Bou
f5a1f7c800
various fixes in btree
...
* read_u8 now takes self.offset into account
* shift cell pointers left on balance_root with offset > 0
* fix wrong writes to page in degragment_page
2024-11-19 17:15:19 +01:00
Pere Diaz Bou
db343ac5ea
fix page1 balancing
2024-11-18 16:25:06 +01:00
Pere Diaz Bou
4aa5612334
fix schema query
2024-11-18 14:06:50 +01:00
Pere Diaz Bou
9f72655e30
tree_create -> btree_create
2024-11-18 10:31:47 +01:00
Pere Diaz Bou
090615b289
create btree table + parse schema
2024-11-16 16:24:28 +01:00
Pere Diaz Bou
66e20df309
fix some offset usages in btree
2024-11-16 16:23:06 +01:00
Pere Diaz Bou
6cd0f03643
core: create databases from limbo
2024-11-15 12:09:07 +01:00
Pere Diaz Bou
87c80b2a07
use core wal file for wasm
2024-11-14 17:54:20 +01:00
Pere Diaz Bou
c46bd63b5a
core: drop mutex on contents
...
There is no need to have mutexes on buffers, we will introduce mutexes
if we want later on a file level to introduce serializability.
2024-11-13 19:13:15 +01:00
Pere Diaz Bou
2a787aedb5
core: extract page stack and document a bit
2024-11-13 17:13:30 +01:00
Pere Diaz Bou
e2276c2e9d
O_DIRECT disable on WAL
2024-11-13 13:45:42 +00:00
Pere Diaz Bou
94a45eab9e
checkpoint inflight
2024-11-13 12:04:54 +00:00
Pere Diaz Bou
cbfb45e55b
more trace logs
2024-11-13 11:31:22 +00:00
Pere Diaz Bou
87957bf4f2
checkpoint log state
2024-11-13 11:24:07 +00:00
Pere Diaz Bou
78118bae81
fmt
2024-11-13 09:34:36 +00:00
Pere Diaz Bou
eb4105282b
btree: fix btree traversal
2024-11-12 23:10:38 +00:00
Pere Diaz Bou
8d1d2d36cc
core/linux: aligned wal header read
2024-11-12 17:53:59 +00:00
Pere Diaz Bou
48f0e72e14
checkpoint on drop connection
2024-11-12 17:03:30 +01:00
Pere Diaz Bou
807496a146
core: load pages if not loaded
...
Since pages are now tracked with a single centralized structure, it is
possible for a page to have been unloaded a be kept in memory for
metadata purposes like going back in the stack.
Using the example of going to a parent page which was unloaded for
whatever reason: in this case we need to check if it's loaded, if not,
we load it. Locked still means the same thing, loaded just means the
contents of a page are present in memory and if they are present, they
must be in cache.
2024-11-12 14:44:25 +01:00
Pere Diaz Bou
cd2b61d838
btree: cursor with lineal stack structure
...
Removed MemPage from the code in favor of an array to encode the stack
of the cursor. This is both simpler and better in terms of memory
access.
2024-11-12 10:21:22 +01:00
Pere Diaz Bou
ce8378793e
btree: run until finished or IO + bug fixes
2024-11-11 17:03:15 +01:00
Pere Diaz Bou
74974d07e7
clippy fix
2024-11-08 11:14:29 +01:00
Pere Diaz Bou
e5836df160
write state machine
...
Returning on ongoing IO requires to save the current state, therefore a
state machine makes sense for write operations. This information is
encoded in WriteInfo/WriteState.
2024-11-08 11:10:49 +01:00
Pere Diaz Bou
ecfcd8835f
rename get_page -> get_current_page
2024-11-07 15:37:21 +01:00
Pere Diaz Bou
0b46648c0e
write wal header on init
2024-11-07 13:29:57 +01:00
Pere Diaz Bou
eb8c462c5f
fix io submission on cacheflush
2024-11-06 16:25:42 +00:00
Pere Diaz Bou
8eb3c89227
wasm,sim fixes
2024-11-05 15:41:30 +01:00
Pere Diaz Bou
a85d599c65
state machine cacheflush
2024-11-05 15:29:54 +01:00
Pere Diaz Bou
70a4ccd8bb
fix linux completion match
2024-11-05 15:29:54 +01:00
Pere Diaz Bou
fc65c5096d
cacheflush state machine
2024-11-05 15:29:54 +01:00
Pere Diaz Bou
f009eb35c6
suspendable checkpoint
2024-11-05 15:29:54 +01:00
Pere Diaz Bou
c0e51c4ca6
wip wal
2024-11-05 15:29:53 +01:00
jussisaurio
f634e7f7a3
clippy fix
2024-10-13 12:08:54 +03:00
jussisaurio
556f4b73c9
Refine edge case handling: add optional predicate to get_next_record()
2024-10-08 08:23:30 +03:00
jussisaurio
43038cb6aa
Handle seek() edge case with index seek
2024-10-08 07:45:21 +03:00
jussisaurio
572db69b5e
Add TODO comment about index corner case
2024-10-07 17:12:19 +03:00
jussisaurio
93a8110773
dont assume index key has rowid in the second column: its the last
2024-10-07 17:05:38 +03:00
jussisaurio
8563d620af
renaming
2024-10-07 17:03:50 +03:00
jussisaurio
fc71f2b32f
traverse index properly
...
interior index cells have values that are not in the leaves, e.g.
(interior: 3)
/ \
(leaf: 2) (leaf: 4)
so their values need to be emitted after the left subtree is emitted.
2024-10-07 13:04:03 +03:00
jussisaurio
e5cf052f07
Why do sqlite btree child keys have <= keys and not < keys
2024-10-06 23:48:59 +03:00
jussisaurio
15a66ea662
single seek function in cursor trait
2024-10-06 09:21:15 +03:00
jussisaurio
6e7db36121
reorder
2024-10-06 00:58:32 +03:00
jussisaurio
af9a751d36
Single seek function
2024-10-06 00:56:18 +03:00
jussisaurio
1ae8d28669
Use same move_to() function for tables and indexes
2024-10-06 00:51:14 +03:00
jussisaurio
37f877109e
Reduce duplication in btree.rs
2024-10-06 00:39:50 +03:00
jussisaurio
3826d4e1ff
Add comment about code duplication
2024-10-05 18:25:04 +03:00
jussisaurio
d2233d69d3
Dont assume the rowid is the second column - it's the last
2024-10-05 18:25:04 +03:00
jussisaurio
3a11887122
fixerinos
2024-10-05 18:25:04 +03:00