Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rollback during Node Table COPY #4467

Merged
merged 28 commits into from
Dec 2, 2024
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7b295fa
Fix COPY rollback
royi-luo Nov 4, 2024
756fef4
Make VersionRecord all stack-allocated
royi-luo Nov 18, 2024
b9af266
Try fix tests
royi-luo Nov 18, 2024
789c54e
Combine interfaces for creating undo buffer info
royi-luo Nov 18, 2024
6a617e0
Properly maintain numTotalRows for rel table data
royi-luo Nov 18, 2024
ac3e9e1
Code cleanup
royi-luo Nov 18, 2024
99e2ef1
Avoid appending to undo buffer for local tables
royi-luo Nov 18, 2024
1308842
Bug fixes
royi-luo Nov 18, 2024
8c72b07
Actually pass rollback insert callback
royi-luo Nov 19, 2024
ffd0cd5
Add second layer of iterators to undo buffer
royi-luo Nov 19, 2024
739b5d8
Bug fixes + code cleanup
royi-luo Nov 19, 2024
14fb9a1
Cleanup node table + actually use semi mask
royi-luo Nov 19, 2024
76ed7d0
Actually enable semi mask
royi-luo Nov 20, 2024
5a1e353
Self-review
royi-luo Nov 20, 2024
a87f669
Add tests
royi-luo Nov 20, 2024
07cef58
Reclaim overflow slots in in-mem hash index after delete
royi-luo Nov 21, 2024
a91e448
Address review comments
royi-luo Nov 29, 2024
9134abb
Replace construct iterator callback with virtual class
royi-luo Nov 29, 2024
c3c638e
Refactor version record handler
royi-luo Nov 29, 2024
89f713f
Refactor version record handler again
royi-luo Nov 29, 2024
08757c3
Rollback insert for node groups
royi-luo Nov 29, 2024
6b30e35
Remove unused forward declares
royi-luo Nov 29, 2024
1a55443
Get correct num of total rows to rollback in node group collection
royi-luo Nov 29, 2024
84b6e17
Make BM exception during rel commit trigger earlier
royi-luo Nov 29, 2024
40691ca
Update num total rows for rel table data node group collection
royi-luo Nov 30, 2024
4ad2632
Address review comments
royi-luo Dec 2, 2024
c052e90
Rework nextChainedSlots() for in mem hash index
royi-luo Dec 2, 2024
cec96e5
Update splitSlots so behaviour is same as before nextChainedSlot() re…
royi-luo Dec 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rollback insert for node groups
  • Loading branch information
royi-luo committed Dec 2, 2024
commit 08757c393f8185cb79369938f766020c2bb685c4
1 change: 1 addition & 0 deletions src/storage/store/node_group.cpp
Original file line number Diff line number Diff line change
@@ -185,6 +185,7 @@ NodeGroupScanResult NodeGroup::scan(const Transaction* transaction, TableScanSta
}
const auto& chunkedGroupToScan =
*chunkedGroups.getGroup(lock, nodeGroupScanState.chunkedGroupIdx);
KU_ASSERT(nodeGroupScanState.nextRowToScan >= chunkedGroupToScan.getStartRowIdx());
const auto rowIdxInChunkToScan =
nodeGroupScanState.nextRowToScan - chunkedGroupToScan.getStartRowIdx();
const auto numRowsToScan =
1 change: 1 addition & 0 deletions src/storage/store/node_table.cpp
Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@ void NodeTableVersionRecordHandler::rollbackInsert(const transaction::Transactio

VersionRecordHandler::rollbackInsert(transaction, nodeGroupIdx, startRow, numRows);
auto* nodeGroup = table->getNodeGroupNoLock(nodeGroupIdx);
nodeGroup->rollbackInsert(startRow);
const auto numRowsToRollback = std::min(numRows, nodeGroup->getNumRows() - startRow);
table->rollbackGroupCollectionInsert(numRowsToRollback);
}
1 change: 1 addition & 0 deletions src/storage/store/rel_table_data.cpp
Original file line number Diff line number Diff line change
@@ -53,6 +53,7 @@ void InMemoryVersionRecordHandler::rollbackInsert(const transaction::Transaction
common::row_idx_t numRows) const {
VersionRecordHandler::rollbackInsert(transaction, nodeGroupIdx, startRow, numRows);
auto* nodeGroup = relTableData->getNodeGroupNoLock(nodeGroupIdx);
nodeGroup->rollbackInsert(startRow);
const auto numRowsToRollback = std::min(numRows, nodeGroup->getNumRows() - startRow);
relTableData->rollbackGroupCollectionInsert(numRowsToRollback, false);
}