-
Notifications
You must be signed in to change notification settings - Fork 85
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
Cleanup hash index initialization #3577
Conversation
Benchmark ResultMaster commit hash:
|
085d492
to
f79b680
Compare
@@ -199,8 +188,8 @@ void OverflowFile::readFromDisk(transaction::TransactionType trxType, common::pa | |||
|
|||
void OverflowFile::writePageToDisk(common::page_idx_t pageIdx, uint8_t* data) const { | |||
if (pageIdx < numPagesOnDisk) { | |||
// TODO: updatePage does an unnecessary read + copy. We just want to overwrite | |||
DBFileUtils::updatePage(*getBMFileHandle(), dbFileID, pageIdx, false, *bufferManager, *wal, | |||
DBFileUtils::updatePage(*getBMFileHandle(), dbFileID, pageIdx, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel we should rename the param bool isInsertingNewPage
inside DBFileUtils::updatePage
. The param is not intuitive. bool readPageBeforeUpdate
should be better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe. I'm hesitant to flip the meaning of the boolean though, as that's something easy to overlook. Maybe we should instead use the BufferManager::PageReadPolicy
to make it more obvious what the parameter means?
f79b680
to
8e982f4
Compare
Benchmark ResultMaster commit hash:
|
Following the rewriting of how hash index and disk array headers are created in #3557, I found that removing createEmptyHashIndexFiles was working with a few tweaks, so this makes the hash index able to initialize itself if the file provided is nonexistent/empty.
I've also removed a couple of unused functions (and functions which were only used in a couple of places and were better off written inline) and added manual zeroing of the padding in
SlotEntry<T>
(which has padding if the type is smaller than 8 bytes).