OmniSciDB
a5dc49c757
|
#include <UpdelRoll.h>
Public Member Functions | |
~UpdelRoll () | |
void | cancelUpdate () |
bool | commitUpdate () |
void | stageUpdate () |
void | addDirtyChunk (std::shared_ptr< Chunk_NS::Chunk > chunk, int fragment_id) |
std::shared_ptr< ChunkMetadata > | getChunkMetadata (const MetaDataKey &key, int32_t column_id, Fragmenter_Namespace::FragmentInfo &fragment_info) |
ChunkMetadataMap | getChunkMetadataMap (const MetaDataKey &key) const |
size_t | getNumTuple (const MetaDataKey &key) const |
void | setNumTuple (const MetaDataKey &key, size_t num_tuple) |
Public Attributes | |
const Catalog_Namespace::Catalog * | catalog = nullptr |
int | logicalTableId |
Data_Namespace::MemoryLevel | memoryLevel {Data_Namespace::MemoryLevel::CPU_LEVEL} |
bool | is_varlen_update = false |
const TableDescriptor * | table_descriptor {nullptr} |
Private Member Functions | |
void | updateFragmenterAndCleanupChunks () |
void | initializeUnsetMetadata (const TableDescriptor *td, Fragmenter_Namespace::FragmentInfo &fragment_info) |
Private Attributes | |
heavyai::shared_mutex | chunk_update_tracker_mutex |
std::map< ChunkKey, std::shared_ptr < Chunk_NS::Chunk > > | dirty_chunks |
std::map< MetaDataKey, size_t > | num_tuples |
std::map< MetaDataKey, ChunkMetadataMap > | chunk_metadata_map_per_fragment |
Definition at line 44 of file UpdelRoll.h.
|
inline |
Definition at line 45 of file UpdelRoll.h.
References cancelUpdate(), and dirty_chunks.
void UpdelRoll::addDirtyChunk | ( | std::shared_ptr< Chunk_NS::Chunk > | chunk, |
int | fragment_id | ||
) |
Definition at line 1486 of file UpdelStorage.cpp.
References CHECK, and Catalog_Namespace::Catalog::getDatabaseId().
Referenced by Fragmenter_Namespace::set_chunk_metadata(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), and Fragmenter_Namespace::InsertOrderFragmenter::updateColumns().
void UpdelRoll::cancelUpdate | ( | ) |
Definition at line 1460 of file UpdelStorage.cpp.
References CHECK, Data_Namespace::DataMgr::free(), Catalog_Namespace::Catalog::getDatabaseId(), Catalog_Namespace::Catalog::getDataMgr(), Catalog_Namespace::Catalog::getMetadataForTable(), Catalog_Namespace::Catalog::getTableEpochs(), lockmgr::TableLockMgrImpl< TableDataLockMgr >::getWriteLockForTable(), TableDescriptor::persistenceLevel, and Catalog_Namespace::Catalog::setTableEpochs().
Referenced by ~UpdelRoll().
bool UpdelRoll::commitUpdate | ( | ) |
Definition at line 1402 of file UpdelStorage.cpp.
References CHECK, Catalog_Namespace::Catalog::checkpoint(), Data_Namespace::DISK_LEVEL, Catalog_Namespace::Catalog::getDatabaseId(), Catalog_Namespace::Catalog::getMetadataForTable(), Catalog_Namespace::Catalog::getTableEpochs(), lockmgr::TableLockMgrImpl< TableDataLockMgr >::getWriteLockForTable(), TableDescriptor::persistenceLevel, Catalog_Namespace::Catalog::setTableEpochsLogExceptions(), and TableDescriptor::tableId.
Referenced by StorageIOFacility::TransactionParameters::finalizeTransaction().
std::shared_ptr< ChunkMetadata > UpdelRoll::getChunkMetadata | ( | const MetaDataKey & | key, |
int32_t | column_id, | ||
Fragmenter_Namespace::FragmentInfo & | fragment_info | ||
) |
Definition at line 1511 of file UpdelStorage.cpp.
References CHECK.
Referenced by Fragmenter_Namespace::set_chunk_metadata(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumnMetadata(), and Fragmenter_Namespace::InsertOrderFragmenter::updateColumns().
ChunkMetadataMap UpdelRoll::getChunkMetadataMap | ( | const MetaDataKey & | key | ) | const |
Definition at line 1524 of file UpdelStorage.cpp.
References CHECK.
Referenced by Fragmenter_Namespace::InsertOrderFragmenter::updateMetadata().
size_t UpdelRoll::getNumTuple | ( | const MetaDataKey & | key | ) | const |
Definition at line 1531 of file UpdelStorage.cpp.
References CHECK.
Referenced by Fragmenter_Namespace::InsertOrderFragmenter::updateMetadata().
|
private |
Definition at line 1497 of file UpdelStorage.cpp.
References Fragmenter_Namespace::FragmentInfo::getChunkMetadataMapPhysicalCopy(), and Fragmenter_Namespace::FragmentInfo::shadowNumTuples.
void UpdelRoll::setNumTuple | ( | const MetaDataKey & | key, |
size_t | num_tuple | ||
) |
Definition at line 1538 of file UpdelStorage.cpp.
Referenced by Fragmenter_Namespace::InsertOrderFragmenter::compactRows().
void UpdelRoll::stageUpdate | ( | ) |
Definition at line 1428 of file UpdelStorage.cpp.
References CHECK, CHECK_EQ, Data_Namespace::DataMgr::checkpoint(), Data_Namespace::CPU_LEVEL, Data_Namespace::DISK_LEVEL, Catalog_Namespace::Catalog::getDatabaseId(), and Catalog_Namespace::Catalog::getDataMgr().
Referenced by TableOptimizer::vacuumFragments().
|
private |
Definition at line 1444 of file UpdelStorage.cpp.
References Data_Namespace::DataMgr::deleteChunksWithPrefix(), Catalog_Namespace::Catalog::getDataMgr(), and Data_Namespace::GPU_LEVEL.
const Catalog_Namespace::Catalog* UpdelRoll::catalog = nullptr |
|
private |
Definition at line 99 of file UpdelRoll.h.
|
mutableprivate |
Definition at line 90 of file UpdelRoll.h.
|
private |
Definition at line 93 of file UpdelRoll.h.
Referenced by ~UpdelRoll().
bool UpdelRoll::is_varlen_update = false |
Definition at line 57 of file UpdelRoll.h.
Referenced by Fragmenter_Namespace::InsertOrderFragmenter::updateColumns().
int UpdelRoll::logicalTableId |
Definition at line 54 of file UpdelRoll.h.
Referenced by Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumns(), and TableOptimizer::vacuumFragments().
Data_Namespace::MemoryLevel UpdelRoll::memoryLevel {Data_Namespace::MemoryLevel::CPU_LEVEL} |
Definition at line 55 of file UpdelRoll.h.
Referenced by Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumns(), and TableOptimizer::vacuumFragments().
|
private |
Definition at line 96 of file UpdelRoll.h.
const TableDescriptor* UpdelRoll::table_descriptor {nullptr} |
Definition at line 58 of file UpdelRoll.h.
Referenced by TableOptimizer::vacuumFragments().