Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

ReadPageGuard and WritePageGuard methods #15

Open
connortsui20 opened this issue Apr 15, 2024 · 0 comments
Open

ReadPageGuard and WritePageGuard methods #15

connortsui20 opened this issue Apr 15, 2024 · 0 comments
Labels
bpm Buffer Pool Manager

Comments

@connortsui20
Copy link
Member

To do anything with a logical page of data, we must first attempt to read/write lock the page, which will give back a ReadPageGuard or a WritePageGuard, depending on which mode we attempt to lock the page in.

(When we get to hybrid latches, there will also potentially be an optimistic read page guard, whatever that means...)

Right now, all you can do is dereference a page guard through Deref and DerefMut to access the underlying [u8] slice. While that is sufficient for most things, there are still methods that we should implement on these guards.

WritePageGuard:

  • Flush / Sync (write data out to disk)
  • Evict (flush and give up ownership of the underlying Frame)
  • Downgrade

ReadPageGuard:

  • Upgrade? (into a WritePageGuard)?
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bpm Buffer Pool Manager
Projects
None yet
Development

No branches or pull requests

1 participant