| 163 | } |
| 164 | |
| 165 | void 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 | |
| 178 | void ShadowFile::reset() { |
| 179 | shadowingFH->resetFileInfo(); |
nothing calls this directly
no test coverage detected