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

Method clear

src/storage/shadow_file.cpp:165–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165void ShadowFile::clear(BufferManager& bm) {
166 DASSERT(shadowingFH);
167 // TODO(Guodong): We should remove shadow file here. This requires changes:
168 // 1. We need to make shadow file not going through BM.
169 // 2. We need to remove fileHandles held in BM, so that BM only keeps FH for the data file.
170 bm.removeFilePagesFromFrames(*shadowingFH);
171 shadowingFH->resetToZeroPagesAndPageCapacity();
172 shadowPagesMap.clear();
173 shadowPageRecords.clear();
174 // Reserve header page.
175 shadowingFH->addNewPage();
176}
177
178void ShadowFile::reset() {
179 shadowingFH->resetFileInfo();

Callers

nothing calls this directly

Calls 3

addNewPageMethod · 0.80

Tested by

no test coverage detected