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

Function handleAppendException

src/storage/table/chunked_node_group.cpp:25–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23
24template<class Chunk>
25static void handleAppendException(std::vector<std::unique_ptr<Chunk>>& chunks, uint64_t numRows) {
26 // After an exception is thrown other threads may continue to work on this chunked group for a
27 // while before they are interrupted
28 // Although the changes will eventually be rolled back
29 // We reset the state of the chunk so later changes won't corrupt any data
30 // Due to the numValues in column chunks not matching the number of rows
31 for (const auto& chunk : chunks) {
32 chunk->truncate(numRows);
33 }
34 std::rethrow_exception(std::current_exception());
35}
36
37ChunkedNodeGroup::ChunkedNodeGroup(std::vector<std::unique_ptr<ColumnChunk>> chunks,
38 row_idx_t startRowIdx, NodeGroupDataFormat format)

Callers 1

appendMethod · 0.85

Calls 1

truncateMethod · 0.45

Tested by

no test coverage detected