Commit Graph

36 Commits

Author SHA1 Message Date
Pere Diaz Bou
84bf0ea96a core: remove a bunch of warnings
Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>
2024-07-31 17:27:02 +02:00
Pere Diaz Bou
463292c2fe core: fix rebase errors 2024-07-31 17:27:02 +02:00
Pere Diaz Bou
845a1ea175 core: cacheflush and fix *Completion casting 2024-07-31 17:27:02 +02:00
Pere Diaz Bou
a441e5e302 core: new custom lru page cache 2024-07-31 17:27:02 +02:00
Miguel Oliveira
ba9977957b add docs to pager 2024-07-26 11:27:19 -03:00
Pekka Enberg
351242561d Kill anyhow usage
Switch anyhow to explicit `LimboError` type using thiserror crate, which
lets us make error handling more structured.
2024-07-25 17:15:08 +03:00
Joan Martinez
4bcae54aa9 fix: use Arc to handle IO 2024-07-21 19:01:58 +02:00
Ryan Tan
9c2988e0ed fix: replace unwrap() with ? 2024-07-07 19:12:48 +08:00
Pere Diaz Bou
7e03cc70d0 core: add minimum cache_size 2024-06-19 20:37:17 +02:00
Pere Diaz Bou
1884aab3b8 core: resize page cache
Abstract page cache with PageCache so that we can call resize inside
refcell
2024-06-19 20:37:17 +02:00
Pere Diaz Bou
53c348402a core: parse unary and write to disk 2024-06-19 20:37:15 +02:00
Pekka Enberg
a3c4efc13a Random code cleanups 2024-06-08 08:38:11 +03:00
Pekka Enberg
707cc53911 Explanation for pager interface 2024-05-07 07:50:42 -03:00
Pekka Enberg
1dd33bedcd Remove commented out code 2024-03-28 14:33:59 +02:00
Pekka Enberg
ed9f3e6d1e Single-threaded architecture
Use Rc instead of Arc and replace the concurrent LRU with
single-threaded SIEVE.

Fixes #23
Fixes #29
2024-03-03 12:44:45 +02:00
Pekka Enberg
bb3cc32d6d Use RefCell instead of Mutex for DatabaseHeader 2024-01-28 10:17:23 +02:00
Pekka Enberg
225ee98769 cargo fmt 2024-01-28 09:58:04 +02:00
Pekka Enberg
0b9b6cfd29 Asynchronous I/O 2024-01-24 08:14:53 +02:00
Pekka Enberg
2bb56ade4b Tracing improvements 2024-01-14 15:47:54 +02:00
Pekka Enberg
725eed964b Tracing improvements 2024-01-14 15:36:59 +02:00
Pekka Enberg
44dcd48071 Fix WebAssembly build 2024-01-14 15:29:27 +02:00
Pekka Enberg
e5798838a0 core: Split page reading into I/O and parsing
In preparation for actually making page reads async, split page reading
into two parts: I/O submission with `begin_read_btree_page()` and
parsing with `finish_read_btree_page()`. Also wire up completion to
perform the read parsing.

Next step is to move the Completion.complete() call somewhere in the I/O
layer and make sure we return from the VM correctly if page is under
I/O.
2024-01-12 17:23:46 +02:00
Pekka Enberg
a39f5c68b4 core: Populate page contents lazily
We need to be able to allocate a new page and insert it into a page
cache without contents for asynchronoous I/O. Let's do that by making
`contents` optional in Page. (We perhaps ought to rename it to
`inner`...)
2024-01-12 16:38:11 +02:00
Pekka Enberg
93670b0505 core: Add Completion.complete() helper 2024-01-12 15:51:10 +02:00
Pekka Enberg
2724b0f411 Simplify Buffer and Completion
Eliminate the explicit lifetime parameter from Buffer to simplify the code.
2024-01-05 16:32:21 +02:00
Pekka Enberg
c28544530e Prepare for asynchronous I/O with page flags
We want to submit I/O asynchronously with io_uring, which means we can
have multiple concurrent lookups to the page that is under I/O.
Therefore, let's add three page flags: up-to-date, locked, and error, so
that the higher level layers can just look up a page, but wait if
there's I/O happening.
2023-11-18 12:19:44 +02:00
Pekka Enberg
1e1e096a48 Refactor I/O and storage layers 2023-09-16 09:34:17 +03:00
Pekka Enberg
b49c242266 Rename PageSource to File 2023-09-10 22:01:45 +03:00
Pekka Enberg
fe41f46bc0 I/O trait 2023-09-10 21:57:36 +03:00
Pekka Enberg
f6cbd9cd6c Eliminate unused variables 2023-09-10 12:39:30 +03:00
Pekka Enberg
4a5c71ab7a I/O interface refactoring 2023-09-09 10:22:26 +03:00
Pekka Enberg
f92a83d083 Switch to LRU page cache
Fixes #5
2023-09-02 21:12:41 +03:00
Pekka Enberg
9d2e7c89d7 Page cache 2023-09-02 19:32:49 +03:00
Pekka Enberg
7c100ea217 Query sqlite_schema table 2023-08-29 19:46:07 +03:00
Pekka Enberg
6a2d36f4c1 Buffer pool 2023-08-27 12:17:20 +03:00
Pekka Enberg
fb72f9688b Initial commit 2023-08-27 09:59:12 +03:00