Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

p1 (bpm) flush api changes #800

Merged
merged 2 commits into from
Jan 22, 2025
Merged

p1 (bpm) flush api changes #800

merged 2 commits into from
Jan 22, 2025

Conversation

rmboyce
Copy link
Contributor

@rmboyce rmboyce commented Jan 20, 2025

Change buffer pool manager flush API to be more understandable:

  1. Added flush methods on read and write page guards that will always flush a consistent state to disk (due to the guard locking the page).
  2. Added safe and unsafe flush methods to the buffer pool manager that lock the pages and don't respectively. The unsafe ones will be faster due to not having to lock pages, but they may flush an inconsistent state to disk if the page is modified while it is flushed. Note that previously, the buffer pool manager only had unsafe flush methods.

@rmboyce rmboyce changed the title p1 flush changes p1 flush api changes Jan 20, 2025
@rmboyce rmboyce changed the title p1 flush api changes p1 (bpm) flush api changes Jan 20, 2025
@rmboyce rmboyce marked this pull request as ready for review January 21, 2025 15:07
Copy link
Member

@connortsui20 connortsui20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this was sorely needed last semester and we didn't have time to get to it!

@rmboyce rmboyce merged commit 3e93325 into master Jan 22, 2025
3 checks passed
@rmboyce rmboyce deleted the rboyce/p1-flush branch January 22, 2025 04:51
mackushev pushed a commit to mackushev/bustub that referenced this pull request Jan 22, 2025
* p1 flush changes

* Note why disk scheduler is shared ptr
mackushev pushed a commit to mackushev/bustub that referenced this pull request Jan 22, 2025
* p1 flush changes

* Note why disk scheduler is shared ptr
Copy link

@MrWhitezz MrWhitezz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BPM flush api and Page Guard api updated correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants