12class SequenceCatalogEntry;
13struct SequenceRollbackData;
15namespace transaction {
31 data = std::make_unique<uint8_t[]>(size);
36 uint8_t
const*
getData()
const {
return data.get(); }
40 KU_ASSERT(currentPosition + offset <= size);
41 currentPosition += offset;
43 bool canFit(uint64_t size_)
const {
return currentPosition + size_ <= this->size; }
46 std::unique_ptr<uint8_t[]> data;
48 uint64_t currentPosition;
87 const catalog::SequenceRollbackData& data);
101 uint8_t* createUndoRecord(uint64_t size);
106 void commitRecord(
UndoRecordType recordType,
const uint8_t* record,
108 void rollbackRecord(
UndoRecordType recordType,
const uint8_t* record);
111 void rollbackCatalogEntryRecord(
const uint8_t* record);
114 void rollbackSequenceEntry(uint8_t
const* entry);
116 void commitVectorVersionInfo(
UndoRecordType recordType,
const uint8_t* record,
118 void rollbackVectorVersionInfo(
UndoRecordType recordType,
const uint8_t* record);
121 void rollbackVectorUpdateInfo(
const uint8_t* record)
const;
126 std::vector<UndoMemoryBuffer> memoryBuffers;
#define KU_ASSERT(condition)
Definition assert.h:19
Definition catalog_entry.h:18
Definition catalog_set.h:24
Definition undo_buffer.h:71
void createVectorInsertInfo(VersionInfo *versionInfo, common::idx_t vectorIdx, common::row_idx_t startRowInVector, common::row_idx_t numRows)
void createSequenceChange(catalog::SequenceCatalogEntry &sequenceEntry, const catalog::SequenceRollbackData &data)
void createVectorUpdateInfo(UpdateInfo *updateInfo, common::idx_t vectorIdx, VectorUpdateInfo *vectorUpdateInfo)
void createCatalogEntry(catalog::CatalogSet &catalogSet, catalog::CatalogEntry &catalogEntry)
void commit(common::transaction_t commitTS) const
void createVectorDeleteInfo(VersionInfo *versionInfo, common::idx_t vectorIdx, common::row_idx_t startRowInVector, common::row_idx_t numRows)
UndoRecordType
Definition undo_buffer.h:75
uint64_t getMemUsage() const
UndoBuffer(transaction::Transaction *transaction)
Definition undo_buffer.h:52
UndoBufferIterator(const UndoBuffer &undoBuffer)
Definition undo_buffer.h:54
void reverseIterate(F &&callback)
void iterate(F &&callback)
Definition undo_buffer.h:26
uint64_t getSize() const
Definition undo_buffer.h:37
static constexpr uint64_t UNDO_MEMORY_BUFFER_SIZE
Definition undo_buffer.h:28
uint8_t * getDataUnsafe() const
Definition undo_buffer.h:35
bool canFit(uint64_t size_) const
Definition undo_buffer.h:43
uint64_t getCurrentPosition() const
Definition undo_buffer.h:38
UndoMemoryBuffer(uint64_t size)
Definition undo_buffer.h:30
void moveCurrentPosition(uint64_t offset)
Definition undo_buffer.h:39
uint8_t const * getData() const
Definition undo_buffer.h:36
Definition update_info.h:46
Definition version_info.h:75
Definition transaction.h:28
uint32_t idx_t
Definition types.h:39
uint64_t transaction_t
Definition types.h:57
uint64_t row_idx_t
Definition types.h:46
Definition alter_type.h:5
static constexpr uint64_t PAGE_4KB_SIZE
Definition constants.h:62
Definition update_info.h:21
Definition version_info.h:17