| 594 | } |
| 595 | |
| 596 | void VersionInfo::commitInsert(row_idx_t startRow, row_idx_t numRows, transaction_t commitTS) { |
| 597 | if (numRows == 0) { |
| 598 | return; |
| 599 | } |
| 600 | auto [startVectorIdx, startRowIdxInVector] = |
| 601 | StorageUtils::getQuotientRemainder(startRow, DEFAULT_VECTOR_CAPACITY); |
| 602 | auto [endVectorIdx, endRowIdxInVector] = |
| 603 | StorageUtils::getQuotientRemainder(startRow + numRows - 1, DEFAULT_VECTOR_CAPACITY); |
| 604 | for (auto vectorIdx = startVectorIdx; vectorIdx <= endVectorIdx; vectorIdx++) { |
| 605 | const auto startRowIdx = vectorIdx == startVectorIdx ? startRowIdxInVector : 0; |
| 606 | const auto endRowIdx = |
| 607 | vectorIdx == endVectorIdx ? endRowIdxInVector : DEFAULT_VECTOR_CAPACITY - 1; |
| 608 | auto& vectorVersionInfo = getOrCreateVersionInfo(vectorIdx); |
| 609 | vectorVersionInfo.setInsertCommitTS(commitTS, startRowIdx, endRowIdx - startRowIdx + 1); |
| 610 | } |
| 611 | } |
| 612 | |
| 613 | void VersionInfo::rollbackInsert(row_idx_t startRow, row_idx_t numRows) { |
| 614 | if (numRows == 0) { |
no test coverage detected