src/backend/gc/gc_manager.cpp
// this function returns a free tuple slot, if one exists
this function returns a free tuple slot, if one exists
this function returns a free tuple slot if one exists
ItemPointer GCManager::ReturnFreeSlot(const oid_t &table_id) {
  if (this->gc_type_ == GC_TYPE_OFF) {
    return ItemPointer();
  }
  std::pair<size_t, std::shared_ptr<LockfreeQueue<TupleMetadata>>> free_list;
  if (free_map_.find(table_id, free_list) == true) {
    TupleMetadata tuple_metadata;
    if (free_list.second->TryPop(tuple_metadata) == true) {
      free_list.first = free_list.first - 1;
      free_map_[table_id] = free_list;
      return ItemPointer(tuple_metadata.tile_group_id,
                         tuple_metadata.tuple_slot_id);
    }
  }
  return ItemPointer();
}
ItemPointer GCManager :: ReturnFreeSlot ( const oid_t & table_id ) { if ( this -> gc_type_ == GC_TYPE_OFF ) { return ItemPointer ( ) ; } std :: pair < size_t , std :: shared_ptr < LockfreeQueue < TupleMetadata > > > free_list ; if ( free_map_ . find ( table_id , free_list ) == true ) { TupleMetadata tuple_metadata ; if ( free_list . second -> TryPop ( tuple_metadata ) == true ) { free_list . first = free_list . first - 1 ; free_map_ [ table_id ] = free_list ; return ItemPointer ( tuple_metadata . tile_group_id , tuple_metadata . tuple_slot_id ) ; } } return ItemPointer ( ) ; }
this function returns a free tuple slot, if one exists
this function returns a free tuple slot if one exists
// if there exists free_list