Files
turso/core
Jussi Saurio a82930d641 Merge 'Completion Error' from Pedro Muniz
Completions can now carry errors inside of them. This allows us to wait
for a completion to complete or to error. When it errors we can properly
tell the caller of `wait_for_completion` that we errored. This will also
allow us to abort completions.
Currently, this just creates the scaffold for us to store the error in
the completion. But to correctly achieve this, it will require some
refactor of our IO implementations to store the `run_once` error for a
particular completion inside of it instead of short circuiting. This
would also allow us to check for an error in `program.step` and properly
rollback.
Also, creates default impls for some common IO methods, this is
important specially for `wait_for_completion` as we want to check the
error in the `Completion` before returning `Ok`.
Maybe we could also accept a Result type in the completion callback so
that we can execute some sort of compensating action on error, like
unlocking a page so it can be evicted by the page cache later.
**EDIT:** actually implemented this in this PR. We store a `Result`
object inside `CompletionInner` behind a `OnceLock` for thread-safety.
We also pass a result object to Completion callbacks to execute
compensating actions.

Reviewed-by: Avinash Sajjanshetty (@avinassh)

Closes #2589
2025-08-19 19:07:57 +03:00
..
2025-08-15 17:08:53 -04:00
2025-06-23 19:52:13 +01:00
2025-08-19 10:48:21 -03:00
2025-06-30 10:01:03 +03:00
2025-08-19 10:48:21 -03:00
2025-08-15 17:08:53 -04:00
2025-01-28 14:55:38 -05:00
2025-08-19 10:48:21 -03:00
2025-06-23 19:52:13 +01:00
2025-08-12 16:42:38 +05:30
2025-01-28 14:55:38 -05:00
2025-06-23 19:52:13 +01:00
2025-08-16 08:03:57 -05:00
2025-08-15 17:08:53 -04:00
2025-06-30 09:54:13 +03:00