Commit Graph

14 Commits

Author SHA1 Message Date
Piotr Sarna
04a78f73fb treewide: add persistent storage trait
This draft adds a persistent storage trait that can be used
to store transaction logs and read the log for recovery purposes.
Work in heavy progress, because ideally the design should also
allow reading versions from the storage, so that data can be
spilled from memory to disk if there's not enough RAM available.
2023-04-17 14:46:39 +02:00
Piotr Sarna
546db5a983 sync: add AsyncMutex trait
With AsyncMutex, we can use different mutex mechanisms
in the database - e.g. tokio::sync::Mutex.
2023-04-14 15:09:13 +02:00
Pekka Enberg
bc7269a776 Fix typo 2023-04-13 10:41:01 +03:00
Pekka Enberg
204d65ad05 Move clock code to clock.rs 2023-04-13 10:09:23 +03:00
Pekka Enberg
22042612d5 Concurrency test
The test is disabled because it triggers an assertion in the MVCC
implementation.
2023-04-12 11:45:15 +03:00
Pekka Enberg
02f40c0568 Move MVCC to database.rs
Let's keep lib.rs small and tidy.
2023-04-09 08:55:06 +03:00
Pekka Enberg
8f30c20215 Replace unwrap() with NoSuchTransactionID error 2023-04-09 08:53:03 +03:00
Pekka Enberg
df0cadc02e Clean up LocalClock default trait 2023-04-08 18:37:23 +03:00
Pekka Enberg
df5500e0df Add test case for dirty read on delete
The test fails, btw.
2023-04-08 18:35:45 +03:00
Pekka Enberg
fb60ccd04d Improve test suite 2023-04-08 18:03:49 +03:00
Pekka Enberg
957949a49d Fix delete() on non-existent ID 2023-04-08 18:03:41 +03:00
Pekka Enberg
7a2085c02f Improve lost update test case
Let's verify that first-writer wins. We still need to fix the second
writer commit() to fail.
2023-04-08 16:42:40 +03:00
Pekka Enberg
29fca23417 Add test case for lost updates
We currently never fail commit() operations so the test case is
incomplete. But let's add it as a place-holder.
2023-04-08 16:34:16 +03:00
Pekka Enberg
7a173a8ae2 Initial commit 2023-04-08 15:14:05 +03:00