bustub
bustub copied to clipboard
BufferPoolManager.NewPage spec is unclear if the pages returned must be pinned
It is unclear from the spec if the pages returned from BufferPoolManager.NewPage must be pinned.
Actually, if they are not the test would fail (as any previously allocated page becomes victimized instantly), from what I can conclude they must be?
And of course, it is funny to return a pointer to a newly allocated page which was concurrently evicted even before the method returned.
It is also unclear whether the new page must be marked as dirty.
@sitano Do you understand the second test case of buffer_pool_manager_test.cpp?
Do you understand the second test case of buffer_pool_manager_test.cpp?
@iwanttbepowerful the TEST(BufferPoolManagerTest, DISABLED_SampleTest) { one?
It that's the one, then yes. Ask what you part you don't.
Do you understand the second test case of buffer_pool_manager_test.cpp?
@iwanttbepowerful the
TEST(BufferPoolManagerTest, DISABLED_SampleTest) {one?It that's the one, then yes. Ask what you part you don't.
Hi, bro. Thanks for your reply. I understood the test case.
Fixed in this year.
https://github.com/cmu-db/bustub/blob/4df5b13f317c86e1f0058135ede3a219b26f3578/src/include/buffer/buffer_pool_manager_instance.h#L66-L68