MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / writePageToDisk

Method writePageToDisk

src/storage/overflow_file.cpp:246–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246void OverflowFile::writePageToDisk(page_idx_t pageIdx, uint8_t* data, bool newPage) const {
247 if (newPage) {
248 DASSERT(fileHandle);
249 DASSERT(!fileHandle->isInMemoryMode());
250 fileHandle->writePageToFile(data, pageIdx);
251 } else {
252 DASSERT(shadowFile);
253 ShadowUtils::updatePage(*fileHandle, pageIdx, true /* overwriting entire page*/,
254 *shadowFile, [&](auto* frame) { memcpy(frame, data, LBUG_PAGE_SIZE); });
255 }
256}
257
258void OverflowFile::checkpoint(PageAllocator& pageAllocator) {
259 DASSERT(fileHandle);

Callers 1

checkpointMethod · 0.80

Calls 2

isInMemoryModeMethod · 0.80
writePageToFileMethod · 0.80

Tested by

no test coverage detected