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

Method applyCommittedUpdates

src/storage/table/lazy_segment_scanner.cpp:23–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23void LazySegmentScanner::applyCommittedUpdates(const UpdateInfo& updateInfo,
24 const transaction::Transaction* transaction, common::offset_t startRow,
25 common::offset_t numRows) {
26 DASSERT(numRows == numValues);
27 rangeSegments(begin(), numRows,
28 [&](auto& segment, common::offset_t, common::offset_t lengthInSegment,
29 common::offset_t offsetInChunk) {
30 updateInfo.iterateScan(transaction, startRow + offsetInChunk, lengthInSegment, 0,
31 [&](const VectorUpdateInfo& vecUpdateInfo, uint64_t i,
32 uint64_t posInOutput) -> void {
33 scanSegmentIfNeeded(segment);
34 segment.segmentData->write(vecUpdateInfo.data.get(), i, posInOutput, 1);
35 });
36 });
37}
38
39void LazySegmentScanner::scanSegmentIfNeeded(LazySegmentData& segment) {
40 if (segment.segmentData == nullptr) {

Callers 1

scanCommittedMethod · 0.45

Calls 3

iterateScanMethod · 0.80
writeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected