mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 10:08:20 +00:00
Merge 'core: wal transaction start' from Pere Diaz Bou
This pr adds support for multiple readers and a single writer with a custom made lock called `LimboRwLock`. Basically there are 5 allowed read locks which store the max frame allowed in that "snapshot" and any reader will try to acquire the biggest one possible. Writer will just try to lock the `write_lock` and if not successful, it will return busy. The only checkpoint mode supported for now is `PASSIVE` but it should be trivial to add more modes. This needs testing, but I will do it in another PR. I just wanted to do it in another PR. Closes #544
This commit is contained in:
commit
49b235cc92
14 changed files with 381 additions and 68 deletions
|
@ -379,6 +379,9 @@ fn get_all_rows(
|
|||
RowResult::Done => {
|
||||
break;
|
||||
}
|
||||
RowResult::Busy => {
|
||||
// for now let's retry?
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(out)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue