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

ReadPageGuard and WritePageGuard methods #15

@connortsui20

Description

@connortsui20

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)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bpmBuffer Pool Manager

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions