Class foreign_storage::ForeignStorageMgr¶
-
class
ForeignStorageMgr: public AbstractBufferMgr¶ Subclassed by foreign_storage::CachingForeignStorageMgr
Public Types
-
using
ParallelismHint= std::pair<int, int>¶
Public Functions
-
ForeignStorageMgr()¶
-
~ForeignStorageMgr()¶
-
AbstractBuffer *
createBuffer(const ChunkKey &chunk_key, const size_t page_size, const size_t initial_size)¶
-
void
deleteBuffer(const ChunkKey &chunk_key, const bool purge)¶
-
void
deleteBuffersWithPrefix(const ChunkKey &chunk_key_prefix, const bool purge)¶
-
AbstractBuffer *
getBuffer(const ChunkKey &chunk_key, const size_t num_bytes)¶
-
void
fetchBuffer(const ChunkKey &chunk_key, AbstractBuffer *destination_buffer, const size_t num_bytes)¶
-
AbstractBuffer *
putBuffer(const ChunkKey &chunk_key, AbstractBuffer *source_buffer, const size_t num_bytes)¶
-
void
getChunkMetadataVecForKeyPrefix(ChunkMetadataVector &chunk_metadata, const ChunkKey &chunk_key_prefix)¶
-
bool
isBufferOnDevice(const ChunkKey &chunk_key)¶
-
std::string
printSlabs()¶
-
size_t
getMaxSize()¶
-
size_t
getInUseSize()¶
-
size_t
getAllocated()¶
-
bool
isAllocationCapped()¶
-
void
checkpoint()¶
-
void
checkpoint(const int db_id, const int tb_id)¶
-
AbstractBuffer *
alloc(const size_t num_bytes)¶
-
void
free(AbstractBuffer *buffer)¶
-
MgrType
getMgrType()¶
-
std::string
getStringMgrType()¶
-
size_t
getNumChunks()¶
-
void
removeTableRelatedDS(const int db_id, const int table_id)¶
-
bool
hasDataWrapperForChunk(const ChunkKey &chunk_key) const¶
-
virtual bool
createDataWrapperIfNotExists(const ChunkKey &chunk_key)¶
-
bool
isDatawrapperRestored(const ChunkKey &chunk_key)¶
-
std::shared_ptr<ForeignDataWrapper>
getDataWrapper(const ChunkKey &chunk_key) const¶
-
virtual void
refreshTable(const ChunkKey &table_key, const bool evict_cached_entries)¶
-
void
setParallelismHints(const std::map<ChunkKey, std::set<ParallelismHint>> &hints_per_table)¶
-
virtual size_t
maxFetchSize(int32_t db_id) const¶
-
virtual bool
hasMaxFetchSize() const¶
Protected Functions
-
virtual void
eraseDataWrapper(const ChunkKey &table_key)¶
-
void
updateFragmenterMetadata(const ChunkToBufferMap&) const¶
-
void
createDataWrapperUnlocked(int32_t db, int32_t tb)¶
-
bool
fetchBufferIfTempBufferMapEntryExists(const ChunkKey &chunk_key, AbstractBuffer *destination_buffer, const size_t num_bytes)¶
-
ChunkToBufferMap
allocateTempBuffersForChunks(const std::set<ChunkKey> &chunk_keys)¶
-
void
clearTempChunkBufferMapEntriesForTable(const ChunkKey &table_key)¶
-
void
clearTempChunkBufferMapEntriesForTableUnlocked(const ChunkKey &table_key)¶
-
std::set<ChunkKey>
getOptionalChunkKeySet(const ChunkKey &chunk_key, const std::set<ChunkKey> &required_chunk_keys, const ForeignDataWrapper::ParallelismLevel parallelism_level) const¶
-
std::pair<std::set<ChunkKey, decltype(set_comp) *>, std::set<ChunkKey, decltype(set_comp) *>>
getPrefetchSets(const ChunkKey &chunk_key, const std::set<ChunkKey> &required_chunk_keys, const ForeignDataWrapper::ParallelismLevel parallelism_level) const¶
-
virtual std::set<ChunkKey>
getOptionalKeysWithinSizeLimit(const ChunkKey &chunk_key, const std::set<ChunkKey, decltype(set_comp) *> &same_fragment_keys, const std::set<ChunkKey, decltype(set_comp) *> &diff_fragment_keys) const¶
Protected Attributes
-
std::shared_mutex
data_wrapper_mutex_¶
-
std::map<ChunkKey, std::shared_ptr<ForeignDataWrapper>>
data_wrapper_map_¶
-
std::map<ChunkKey, std::unique_ptr<AbstractBuffer>>
temp_chunk_buffer_map_¶
-
std::shared_mutex
temp_chunk_buffer_map_mutex_¶
-
std::shared_mutex
parallelism_hints_mutex_¶
-
std::map<ChunkKey, std::set<ParallelismHint>>
parallelism_hints_per_table_¶
Protected Static Functions
-
static void
checkIfS3NeedsToBeEnabled(const ChunkKey &chunk_key)¶
-
using