Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::CleanupState Class Reference
Collaboration diagram for duckdb::CleanupState:

Public Member Functions

 CleanupState (DuckTransaction &transaction, transaction_t lowest_active_transaction, ActiveTransactionState transaction_state)
void CleanupEntry (UndoFlags type, data_ptr_t data)

Private Member Functions

void CleanupDelete (DeleteInfo &info)
void CleanupUpdate (UpdateInfo &info)

Private Attributes

transaction_t lowest_active_transaction
 Lowest active transaction.
ActiveTransactionState transaction_state
IndexDataRemover index_data_remover
 While cleaning up, we remove data from any delta indexes we added data to during the commit.

Constructor & Destructor Documentation

◆ CleanupState()

duckdb::CleanupState::CleanupState ( DuckTransaction & transaction,
transaction_t lowest_active_transaction,
ActiveTransactionState transaction_state )
explicit
445704 : lowest_active_transaction(lowest_active_transaction), transaction_state(transaction_state),
445705 index_data_remover(transaction, QueryContext(), IndexRemovalType::DELETED_ROWS_IN_USE) {
445706}
transaction_t lowest_active_transaction
Lowest active transaction.
Definition duckdb.cpp:445653
IndexDataRemover index_data_remover
While cleaning up, we remove data from any delta indexes we added data to during the commit.
Definition duckdb.cpp:445656
@ DELETED_ROWS_IN_USE
Remove from deleted_rows_in_use.
Definition duckdb.hpp:50454

Member Function Documentation

◆ CleanupEntry()

void duckdb::CleanupState::CleanupEntry ( UndoFlags type,
data_ptr_t data )
445708 {
445709 switch (type) {
445710 case UndoFlags::CATALOG_ENTRY: {
445711 auto catalog_entry = Load<CatalogEntry *>(data);
445712 D_ASSERT(catalog_entry);
445713 auto &entry = *catalog_entry;
445714 D_ASSERT(entry.set);
445715 entry.set->CleanupEntry(entry);
445716 break;
445717 }
445718 case UndoFlags::INSERT_TUPLE: {
445719 auto info = reinterpret_cast<AppendInfo *>(data);
445720 // mark the tuples as committed
445721 info->table->CleanupAppend(lowest_active_transaction, info->start_row, info->count);
445722 break;
445723 }
445724 case UndoFlags::DELETE_TUPLE: {
445725 auto info = reinterpret_cast<DeleteInfo *>(data);
445726 CleanupDelete(*info);
445727 break;
445728 }
445729 case UndoFlags::UPDATE_TUPLE: {
445730 auto info = reinterpret_cast<UpdateInfo *>(data);
445731 CleanupUpdate(*info);
445732 break;
445733 }
445734 default:
445735 break;
445736 }
445737}

◆ CleanupDelete()

void duckdb::CleanupState::CleanupDelete ( DeleteInfo & info)
private
445744 {
445745 if (transaction_state == ActiveTransactionState::NO_OTHER_TRANSACTIONS) {
445746 // if there are no active transactions we don't need to do any clean-up, as we haven't written to
445747 // deleted_rows_in_use
445748 return;
445749 }
445750 index_data_remover.PushDelete(info);
445751}

◆ CleanupUpdate()

void duckdb::CleanupState::CleanupUpdate ( UpdateInfo & info)
private
445739 {
445740 // remove the update info from the update chain
445741 info.segment->CleanupUpdate(info);
445742}

The documentation for this class was generated from the following file: