Skip to content

Commit

Permalink
Merge pull request #2438 from kuzudb/file-end-fix
Browse files Browse the repository at this point in the history
Always write a whole page at a time when writing compressed data
  • Loading branch information
benjaminwinger committed Nov 17, 2023
2 parents b1cef8e + dbbc0e6 commit 0763648
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/storage/store/column_chunk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ class CompressedFlushBuffer {
}
KU_ASSERT(numPages < metadata.numPages);
KU_ASSERT(dataFH->getNumPages() > startPageIdx + numPages);
FileUtils::writeToFile(dataFH->getFileInfo(), compressedBuffer.get(), compressedSize,
FileUtils::writeToFile(dataFH->getFileInfo(), compressedBuffer.get(),
BufferPoolConstants::PAGE_4KB_SIZE,
(startPageIdx + numPages) * BufferPoolConstants::PAGE_4KB_SIZE);
numPages++;
}
Expand Down

0 comments on commit 0763648

Please sign in to comment.