| 606 | } |
| 607 | |
| 608 | void CSRNodeGroup::checkpointColumn(const UniqLock& lock, column_id_t columnID, |
| 609 | const CSRNodeGroupCheckpointState& csrState, const std::vector<CSRRegion>& regions) const { |
| 610 | std::vector<ChunkCheckpointState> chunkCheckpointStates; |
| 611 | chunkCheckpointStates.reserve(regions.size()); |
| 612 | for (auto& region : regions) { |
| 613 | if (!region.needCheckpointColumn(columnID)) { |
| 614 | // Skip checkpoint for the column if it has no changes in the region. |
| 615 | continue; |
| 616 | } |
| 617 | auto regionCheckpointStates = checkpointColumnInRegion(lock, columnID, csrState, region); |
| 618 | // If there are no rows to write for the region, we don't aggressively reclaim the space in |
| 619 | // the region, but keep deleted rows as gaps. This can happen when all rows are deleted |
| 620 | // within the region. |
| 621 | for (auto& regionCheckpointState : regionCheckpointStates) { |
| 622 | chunkCheckpointStates.push_back(std::move(regionCheckpointState)); |
| 623 | } |
| 624 | } |
| 625 | persistentChunkGroup->getColumnChunk(columnID).checkpoint(*csrState.columns[columnID], |
| 626 | std::move(chunkCheckpointStates), csrState.pageAllocator); |
| 627 | } |
| 628 | |
| 629 | struct SegmentCursor { |
| 630 | SegmentCursor(LazySegmentScanner& scanner, offset_t leftCSROffset) |
nothing calls this directly
no test coverage detected