src/backend/logging/loggers/wal_frontend_logger.cpp
/**
 * @brief move tuples from current txn to recovery txn so that we can commit
 * them later
 * @param recovery txn
 */
@brief move tuples from current txn to recovery txn so that we can commit
them later
@param recovery txn
@brief move tuples from current txn to recovery txn so that we can commit them later @param recovery txn
void WriteAheadFrontendLogger::CommitTransactionRecovery(cid_t commit_id) {
  std::vector<TupleRecord *> &tuple_records = recovery_txn_table[commit_id];
  for (auto it = tuple_records.begin(); it != tuple_records.end(); it++) {
    TupleRecord *curr = *it;
    switch (curr->GetType()) {
      case LOGRECORD_TYPE_WAL_TUPLE_INSERT:
        InsertTuple(curr);
        break;
      case LOGRECORD_TYPE_WAL_TUPLE_UPDATE:
        UpdateTuple(curr);
        break;
      case LOGRECORD_TYPE_WAL_TUPLE_DELETE:
        DeleteTuple(curr);
        break;
      default:
        continue;
    }
    delete curr;
  }
  max_cid = commit_id + 1;
  recovery_txn_table.erase(commit_id);
}
void WriteAheadFrontendLogger :: CommitTransactionRecovery ( cid_t commit_id ) { std :: vector < TupleRecord * > & tuple_records = recovery_txn_table [ commit_id ] ; for ( auto it = tuple_records . begin ( ) ; it != tuple_records . end ( ) ; it ++ ) { TupleRecord * curr = * it ; switch ( curr -> GetType ( ) ) { case LOGRECORD_TYPE_WAL_TUPLE_INSERT : InsertTuple ( curr ) ; break ; case LOGRECORD_TYPE_WAL_TUPLE_UPDATE : UpdateTuple ( curr ) ; break ; case LOGRECORD_TYPE_WAL_TUPLE_DELETE : DeleteTuple ( curr ) ; break ; default : continue ; } delete curr ; } max_cid = commit_id + 1 ; recovery_txn_table . erase ( commit_id ) ; }
@brief move tuples from current txn to recovery txn so that we can commit
 them later
 @param recovery txn
@brief move tuples from current txn to recovery txn so that we can commit them later @param recovery txn