-
Notifications
You must be signed in to change notification settings - Fork 1
Hybrid Latches #12
Description
Right now, the Page struct uses a tokio RwLock to protect the inner Frame's data. This should be fine for now, but to maximize the parallelism, we will probably want to implement the hybrid latch described in this paper by the Germans.
There is already an implementation in Rust of a hybrid lock as a crate, but we will want to somehow make an asynchronous version of the lock. I don't really know what the semantics of it would be, but it would probably be something along the lines of the optimistic read being synchronous and the pessimistic reads and writes be asynchronous? Though that would mean the entire interface (including the optimistic read) would have to be asynchronous. Still not sure of all of the implications of making a lock async, and I think I need to go through the actual asynchronous RwLock and Mutex implementations in tokio to get a better understanding.