OmniSciDB
a5dc49c757
|
#include <FileMgr.h>
Public Member Functions | |
FileMgr (const int32_t device_id, GlobalFileMgr *gfm, const TablePair file_mgr_key, const int32_t max_rollback_epochs=-1, const size_t num_reader_threads=0, const int32_t epoch=-1) | |
Constructor. More... | |
FileMgr (const int32_t device_id, GlobalFileMgr *gfm, const TablePair file_mgr_key, const bool run_core_init) | |
FileMgr (GlobalFileMgr *gfm, std::string basePath) | |
~FileMgr () override | |
Destructor. More... | |
StorageStats | getStorageStats () const |
FileBuffer * | createBuffer (const ChunkKey &key, size_t pageSize=0, const size_t numBytes=0) override |
Creates a chunk with the specified key and page size. More... | |
bool | isBufferOnDevice (const ChunkKey &key) override |
void | deleteBuffer (const ChunkKey &key, const bool purge=true) override |
Deletes the chunk with the specified key. More... | |
void | deleteBuffersWithPrefix (const ChunkKey &keyPrefix, const bool purge=true) override |
FileBuffer * | getBuffer (const ChunkKey &key, const size_t numBytes=0) override |
Returns the a pointer to the chunk with the specified key. More... | |
void | fetchBuffer (const ChunkKey &key, AbstractBuffer *destBuffer, const size_t numBytes) override |
FileBuffer * | putBuffer (const ChunkKey &key, AbstractBuffer *d, const size_t numBytes=0) override |
Puts the contents of d into the Chunk with the given key. More... | |
AbstractBuffer * | alloc (const size_t numBytes) override |
void | free (AbstractBuffer *buffer) override |
virtual Page | requestFreePage (size_t pagesize, const bool isMetadata) |
MgrType | getMgrType () override |
std::string | getStringMgrType () override |
std::string | printSlabs () override |
size_t | getMaxSize () override |
size_t | getInUseSize () override |
size_t | getAllocated () override |
bool | isAllocationCapped () override |
FileInfo * | getFileInfoForFileId (const int32_t fileId) const |
FileMetadata | getMetadataForFile (const boost::filesystem::directory_iterator &fileIterator) const |
void | copyPage (Page &srcPage, FileMgr *destFileMgr, Page &destPage, const size_t reservedHeaderSize, const size_t numBytes, const size_t offset) |
void | requestFreePages (size_t npages, size_t pagesize, std::vector< Page > &pages, const bool isMetadata) |
Obtains free pages – creates new files if necessary – of the requested size. More... | |
void | getChunkMetadataVecForKeyPrefix (ChunkMetadataVector &chunkMetadataVec, const ChunkKey &keyPrefix) override |
bool | hasChunkMetadataForKeyPrefix (const ChunkKey &keyPrefix) |
void | checkpoint () override |
Fsyncs data files, writes out epoch and fsyncs that. More... | |
void | checkpoint (const int32_t db_id, const int32_t tb_id) override |
virtual int32_t | epoch (int32_t db_id, int32_t tb_id) const |
Returns current value of epoch - should be one greater than recorded at last checkpoint. Because FileMgr only contains buffers from one table we can just return the FileMgr's epoch instead of finding a table-specific epoch. More... | |
int32_t | epochFloor () const |
int32_t | incrementEpoch () |
int32_t | lastCheckpointedEpoch () const |
Returns value of epoch at last checkpoint. More... | |
void | resetEpochFloor () |
int32_t | maxRollbackEpochs () |
Returns value max_rollback_epochs. More... | |
size_t | getNumReaderThreads () |
Returns number of threads defined by parameter num-reader-threads which should be used during initial load and consequent read of data. More... | |
FILE * | getFileForFileId (const int32_t fileId) |
Returns FILE pointer associated with requested fileId. More... | |
size_t | getNumChunks () override |
size_t | getNumUsedMetadataPagesForChunkKey (const ChunkKey &chunkKey) const |
bool | getDBConvert () const |
Index for looking up chunks. More... | |
void | createOrMigrateTopLevelMetadata () |
std::string | getFileMgrBasePath () const |
virtual void | closeRemovePhysical () |
void | removeTableRelatedDS (const int32_t db_id, const int32_t table_id) override |
virtual void | free_page (std::pair< FileInfo *, int32_t > &&page) |
virtual bool | hasFileMgrKey () const |
const TablePair | get_fileMgrKey () const |
boost::filesystem::path | getFilePath (const std::string &file_name) const |
void | writePageMappingsToStatusFile (const std::vector< PageMapping > &page_mappings) |
void | renameCompactionStatusFile (const char *const from_status, const char *const to_status) |
void | compactFiles () |
virtual bool | updatePageIfDeleted (FileInfo *file_info, ChunkKey &chunk_key, int32_t contingent, int32_t page_epoch, int32_t page_num) |
deletes or recovers a page based on last checkpointed epoch. More... | |
virtual bool | failOnReadError () const |
True if a read error should cause a fatal error. More... | |
size_t | getPageSize () const |
size_t | getMetadataPageSize () const |
virtual std::string | describeSelf () const |
FILE * | createFile (const std::string &full_path, const size_t requested_file_size) const |
std::pair< FILE *, std::string > | createFile (const std::string &base_path, const int file_id, const size_t page_size, const size_t num_pages) const |
size_t | writeFile (FILE *f, const size_t offset, const size_t size, const int8_t *buf) const |
Static Public Member Functions | |
static void | setNumPagesPerDataFile (size_t num_pages) |
static void | setNumPagesPerMetadataFile (size_t num_pages) |
static void | renameAndSymlinkLegacyFiles (const std::string &table_data_dir) |
Public Attributes | |
ChunkKeyToChunkMap | chunkIndex_ |
Static Public Attributes | |
static constexpr size_t | DEFAULT_NUM_PAGES_PER_DATA_FILE {256} |
static constexpr size_t | DEFAULT_NUM_PAGES_PER_METADATA_FILE {4096} |
static constexpr char const * | COPY_PAGES_STATUS {"pending_data_compaction_0"} |
static constexpr char const * | UPDATE_PAGE_VISIBILITY_STATUS {"pending_data_compaction_1"} |
static constexpr char const * | DELETE_EMPTY_FILES_STATUS {"pending_data_compaction_2"} |
static constexpr char | LEGACY_EPOCH_FILENAME [] = "epoch" |
static constexpr char | EPOCH_FILENAME [] = "epoch_metadata" |
static constexpr char | DB_META_FILENAME [] = "dbmeta" |
static constexpr char | FILE_MGR_VERSION_FILENAME [] = "filemgr_version" |
static constexpr int32_t | INVALID_VERSION = -1 |
static constexpr int32_t | LATEST_FILE_MGR_VERSION = 2 |
Protected Member Functions | |
FileMgr (const size_t defaultPageSize, const size_t defaultMetadataPageSize) | |
FileInfo * | createFileInfo (const size_t pageSize, const size_t numPages) |
Adds a file to the file manager repository. More... | |
FileInfo * | openExistingFile (const std::string &path, const int32_t fileId, const size_t pageSize, const size_t numPages, std::vector< HeaderInfo > &headerVec) |
void | createEpochFile (const std::string &epochFileName) |
int32_t | openAndReadLegacyEpochFile (const std::string &epochFileName) |
void | openAndReadEpochFile (const std::string &epochFileName) |
void | writeAndSyncEpochToDisk () |
void | setEpoch (const int32_t newEpoch) |
int32_t | readVersionFromDisk (const std::string &versionFileName) const |
void | writeAndSyncVersionToDisk (const std::string &versionFileName, const int32_t version) |
void | processFileFutures (std::vector< std::future< std::vector< HeaderInfo >>> &file_futures, std::vector< HeaderInfo > &headerVec) |
virtual FileBuffer * | createBufferUnlocked (const ChunkKey &key, size_t pageSize=0, const size_t numBytes=0) |
virtual FileBuffer * | createBufferFromHeaders (const ChunkKey &key, const std::vector< HeaderInfo >::const_iterator &headerStartIt, const std::vector< HeaderInfo >::const_iterator &headerEndIt) |
void | migrateToLatestFileMgrVersion () |
void | migrateEpochFileV0 () |
void | migrateLegacyFilesV1 () |
OpenFilesResult | openFiles () |
void | clearFileInfos () |
void | copySourcePageForCompaction (const Page &source_page, FileInfo *destination_file_info, std::vector< PageMapping > &page_mappings, std::set< Page > &touched_pages) |
int32_t | copyPageWithoutHeaderSize (const Page &source_page, const Page &destination_page) |
void | sortAndCopyFilePagesForCompaction (size_t page_size, std::vector< PageMapping > &page_mappings, std::set< Page > &touched_pages) |
void | updateMappedPagesVisibility (const std::vector< PageMapping > &page_mappings) |
void | deleteEmptyFiles () |
void | resumeFileCompaction (const std::string &status_file_name) |
std::vector< PageMapping > | readPageMappingsFromStatusFile () |
FileMgr (const int epoch) | |
void | closePhysicalUnlocked () |
void | syncFilesToDisk () |
void | freePages () |
void | initializeNumThreads (size_t num_reader_threads=0) |
virtual FileBuffer * | allocateBuffer (const size_t page_size, const ChunkKey &key, const size_t num_bytes=0) |
virtual FileBuffer * | allocateBuffer (const ChunkKey &key, const std::vector< HeaderInfo >::const_iterator &headerStartIt, const std::vector< HeaderInfo >::const_iterator &headerEndIt) |
virtual ChunkKeyToChunkMap::iterator | deleteBufferUnlocked (const ChunkKeyToChunkMap::iterator chunk_it, const bool purge=true) |
virtual FileBuffer * | getBufferUnlocked (const ChunkKey &key, const size_t numBytes=0) const |
Protected Attributes | |
int32_t | maxRollbackEpochs_ |
std::string | fileMgrBasePath_ |
std::map< int32_t, std::unique_ptr< FileInfo > > | files_ |
PageSizeFileMMap | fileIndex_ |
size_t | num_reader_threads_ |
Maps page sizes to FileInfo objects. More... | |
unsigned | nextFileId_ |
number of threads used when loading data More... | |
int32_t | fileMgrVersion_ |
the index of the next file id More... | |
FILE * | DBMetaFile_ = nullptr |
std::mutex | getPageMutex_ |
pointer to DB level metadata More... | |
heavyai::shared_mutex | chunkIndexMutex_ |
heavyai::shared_mutex | files_rw_mutex_ |
heavyai::shared_mutex | mutex_free_page_ |
std::vector< std::pair < FileInfo *, int32_t > > | free_pages_ |
bool | isFullyInitted_ {false} |
const size_t | page_size_ |
const size_t | metadata_page_size_ |
Static Protected Attributes | |
static size_t | num_pages_per_data_file_ {DEFAULT_NUM_PAGES_PER_DATA_FILE} |
static size_t | num_pages_per_metadata_file_ {DEFAULT_NUM_PAGES_PER_METADATA_FILE} |
Private Member Functions | |
void | init (const size_t num_reader_threads, const int32_t epochOverride) |
void | init (const std::string &dataPathToConvertFrom, const int32_t epochOverride) |
void | rollOffOldData (const int32_t epochCeiling, const bool shouldCheckpoint) |
void | freePagesBeforeEpoch (const int32_t min_epoch) |
void | freePagesBeforeEpochUnlocked (const int32_t min_epoch, const ChunkKeyToChunkMap::iterator lower_bound, const ChunkKeyToChunkMap::iterator upper_bound) |
FileBuffer * | getOrCreateBuffer (const ChunkKey &key) |
bool | coreInit () |
Determines file path, and if exists, runs file migration and opens and reads epoch file. More... | |
int32_t | epoch () const |
void | writeDirtyBuffers () |
void | setDataAndMetadataFileStats (StorageStats &storage_stats) const |
uint32_t | getFragmentCount () const |
virtual void | readOnlyCheck (const std::string &action, const std::optional< std::string > &file_name={}) const |
Private Attributes | |
GlobalFileMgr * | gfm_ |
TablePair | fileMgrKey_ |
Global FileMgr. More... | |
Epoch | epoch_ |
bool | epochIsCheckpointed_ = true |
FILE * | epochFile_ = nullptr |
Friends | |
class | GlobalFileMgr |
File_Namespace::FileMgr::FileMgr | ( | const int32_t | device_id, |
GlobalFileMgr * | gfm, | ||
const TablePair | file_mgr_key, | ||
const int32_t | max_rollback_epochs = -1 , |
||
const size_t | num_reader_threads = 0 , |
||
const int32_t | epoch = -1 |
||
) |
Constructor.
Definition at line 51 of file FileMgr.cpp.
References init().
File_Namespace::FileMgr::FileMgr | ( | const int32_t | device_id, |
GlobalFileMgr * | gfm, | ||
const TablePair | file_mgr_key, | ||
const bool | run_core_init | ||
) |
Definition at line 68 of file FileMgr.cpp.
References coreInit(), epochFile_, fileMgrBasePath_, fileMgrKey_, files_, File_Namespace::GlobalFileMgr::getBasePath(), gfm_, and to_string().
File_Namespace::FileMgr::FileMgr | ( | GlobalFileMgr * | gfm, |
std::string | basePath | ||
) |
Definition at line 92 of file FileMgr.cpp.
References init().
|
override |
Destructor.
Definition at line 118 of file FileMgr.cpp.
References chunkIndex_, File_Namespace::close(), DBMetaFile_, epochFile_, and files_.
|
protected |
Definition at line 113 of file FileMgr.cpp.
|
protected |
Definition at line 105 of file FileMgr.cpp.
References Epoch::ceiling(), and epoch_.
|
override |
Definition at line 868 of file FileMgr.cpp.
References logger::FATAL, and LOG.
|
protectedvirtual |
Reimplemented in File_Namespace::CachingFileMgr.
Definition at line 1623 of file FileMgr.cpp.
Referenced by createBufferFromHeaders(), and createBufferUnlocked().
|
protectedvirtual |
Reimplemented in File_Namespace::CachingFileMgr.
Definition at line 1629 of file FileMgr.cpp.
|
override |
Fsyncs data files, writes out epoch and fsyncs that.
Definition at line 706 of file FileMgr.cpp.
References describeSelf(), epoch(), freePages(), incrementEpoch(), rollOffOldData(), syncFilesToDisk(), VLOG, writeAndSyncEpochToDisk(), and writeDirtyBuffers().
Referenced by rollOffOldData().
|
inlineoverride |
Definition at line 272 of file FileMgr.h.
References logger::FATAL, and LOG.
|
protected |
Definition at line 247 of file FileMgr.cpp.
References fileIndex_, and files_.
Referenced by init().
|
protected |
Definition at line 556 of file FileMgr.cpp.
References File_Namespace::close(), DBMetaFile_, epochFile_, and files_.
Referenced by File_Namespace::CachingFileMgr::closeRemovePhysical(), and closeRemovePhysical().
|
virtual |
Reimplemented in File_Namespace::CachingFileMgr.
Definition at line 575 of file FileMgr.cpp.
References closePhysicalUnlocked(), files_rw_mutex_, getFileMgrBasePath(), readOnlyCheck(), and File_Namespace::renameForDelete().
void File_Namespace::FileMgr::compactFiles | ( | ) |
Compacts metadata and data file pages and deletes resulting empty files (if any exists). Compaction occurs in 3 idempotent phases in order to enable graceful recovery if a crash/process interruption occurs in the middle data compaction.
Phase 1: Create a status file that indicates initiation of this phase. Sort metadata/data files in order of files with the lowest number of free pages to those with the highest number of free pages. Copy over used pages from files at the end of the sorted order (files with the highest number of free pages) to those at the beginning of the sorted order (files with the lowest number of free pages). Keep destination/copied to pages as free while copying. Keep track of copied source to destination page mapping. Write page mapping to the status file (to be used during crash recovery if needed).
Phase 2: Rename status file to a file name that indicates initiation of this phase. Go through page mapping and mark source/copied from pages as free while making the destination/copied to pages as used.
Phase 3: Rename status file to a file name that indicates initiation of this phase. Delete all empty files (files containing only free pages). Delete status file.
Definition at line 1276 of file FileMgr.cpp.
References CHECK, COPY_PAGES_STATUS, DELETE_EMPTY_FILES_STATUS, deleteEmptyFiles(), files_, files_rw_mutex_, getFilePath(), readOnlyCheck(), renameCompactionStatusFile(), sortAndCopyFilePagesForCompaction(), UPDATE_PAGE_VISIBILITY_STATUS, updateMappedPagesVisibility(), and writePageMappingsToStatusFile().
Referenced by resumeFileCompaction().
void File_Namespace::FileMgr::copyPage | ( | Page & | srcPage, |
FileMgr * | destFileMgr, | ||
Page & | destPage, | ||
const size_t | reservedHeaderSize, | ||
const size_t | numBytes, | ||
const size_t | offset | ||
) |
Definition at line 586 of file FileMgr.cpp.
References CHECK, checked_malloc(), File_Namespace::Page::fileId, free(), getFileInfoForFileId(), page_size_, File_Namespace::Page::pageNum, File_Namespace::FileInfo::read(), and File_Namespace::FileInfo::write().
Referenced by init().
|
protected |
Copies content of source_page to destination_page without copying over the source_page header size. The header size is instead returned by the method. Not copying over the header size enables a use case where destination_page has all the content of the source_page but is still marked as a free page.
Definition at line 1441 of file FileMgr.cpp.
References CHECK, CHECK_EQ, File_Namespace::Page::fileId, File_Namespace::FileInfo::fileId, getFileInfoForFileId(), File_Namespace::Page::pageNum, File_Namespace::FileInfo::pageSize, File_Namespace::FileInfo::read(), and File_Namespace::FileInfo::write().
Referenced by copySourcePageForCompaction().
|
protected |
Copies a used page (indicated by the top of the source_used_pages set) from the given source file to a free page in the given destination file. Source and destination pages are recorded in the given page_mappings vector after copying is done.
Definition at line 1411 of file FileMgr.cpp.
References CHECK, CHECK_NE, copyPageWithoutHeaderSize(), File_Namespace::Page::fileId, File_Namespace::FileInfo::fileId, File_Namespace::FileInfo::getFreePage(), and File_Namespace::Page::pageNum.
Referenced by sortAndCopyFilePagesForCompaction().
|
private |
Determines file path, and if exists, runs file migration and opens and reads epoch file.
Definition at line 137 of file FileMgr.cpp.
References EPOCH_FILENAME, logger::FATAL, fileMgrBasePath_, fileMgrKey_, files_rw_mutex_, File_Namespace::GlobalFileMgr::getBasePath(), gfm_, LOG, migrateToLatestFileMgrVersion(), openAndReadEpochFile(), and to_string().
Referenced by FileMgr(), and init().
|
override |
Creates a chunk with the specified key and page size.
Definition at line 716 of file FileMgr.cpp.
References CHECK, chunkIndex_, chunkIndexMutex_, createBufferUnlocked(), and show_chunk().
Referenced by init().
|
protectedvirtual |
Reimplemented in File_Namespace::CachingFileMgr.
Definition at line 737 of file FileMgr.cpp.
References allocateBuffer(), CHECK, chunkIndex_, chunkIndexMutex_, and show_chunk().
Referenced by init().
|
protectedvirtual |
Reimplemented in File_Namespace::CachingFileMgr.
Definition at line 726 of file FileMgr.cpp.
References allocateBuffer(), chunkIndex_, and page_size_.
Referenced by createBuffer(), and getOrCreateBuffer().
|
protected |
Definition at line 606 of file FileMgr.cpp.
References Epoch::byte_size(), File_Namespace::create(), epochFile_, logger::FATAL, fileMgrBasePath_, LOG, readOnlyCheck(), and writeAndSyncEpochToDisk().
Referenced by init(), and migrateEpochFileV0().
FILE * File_Namespace::FileMgr::createFile | ( | const std::string & | full_path, |
const size_t | requested_file_size | ||
) | const |
Definition at line 1701 of file FileMgr.cpp.
References File_Namespace::create(), and readOnlyCheck().
std::pair< FILE *, std::string > File_Namespace::FileMgr::createFile | ( | const std::string & | base_path, |
const int | file_id, | ||
const size_t | page_size, | ||
const size_t | num_pages | ||
) | const |
Definition at line 1707 of file FileMgr.cpp.
References File_Namespace::create(), File_Namespace::get_data_file_path(), and readOnlyCheck().
|
protected |
Adds a file to the file manager repository.
This method will create a FileInfo object for the file being added, and it will create the corresponding file on physical disk with the indicated number of pages pre-allocated.
A pointer to the FileInfo object is returned, which itself has a file pointer (FILE*) and a file identifier (int32_t fileId).
fileName | The name given to the file in physical storage. |
pageSize | The logical page size for the pages in the file. |
numPages | The number of logical pages to initially allocate for the file. |
Definition at line 968 of file FileMgr.cpp.
References CHECK, File_Namespace::create(), f(), logger::FATAL, fileIndex_, fileMgrBasePath_, files_, files_rw_mutex_, File_Namespace::get_data_file_path(), getFileInfoForFileId(), LOG, nextFileId_, and readOnlyCheck().
Referenced by requestFreePage(), and requestFreePages().
void File_Namespace::FileMgr::createOrMigrateTopLevelMetadata | ( | ) |
Definition at line 1056 of file FileMgr.cpp.
References DB_META_FILENAME, File_Namespace::GlobalFileMgr::db_version_, logger::FATAL, gfm_, INVALID_VERSION, LOG, readVersionFromDisk(), and writeAndSyncVersionToDisk().
|
override |
Deletes the chunk with the specified key.
Definition at line 753 of file FileMgr.cpp.
References CHECK, chunkIndex_, chunkIndexMutex_, deleteBufferUnlocked(), and show_chunk().
|
override |
Definition at line 770 of file FileMgr.cpp.
References chunkIndex_, chunkIndexMutex_, and deleteBufferUnlocked().
|
protectedvirtual |
Reimplemented in File_Namespace::CachingFileMgr.
Definition at line 760 of file FileMgr.cpp.
References chunkIndex_.
Referenced by deleteBuffer(), and deleteBuffersWithPrefix().
|
protected |
Deletes files that contain only free pages. Also deletes the compaction status file.
Definition at line 1504 of file FileMgr.cpp.
References CHECK, CHECK_EQ, DELETE_EMPTY_FILES_STATUS, fileMgrBasePath_, files_, File_Namespace::get_data_file_path(), File_Namespace::get_legacy_data_file_path(), getFilePath(), and readOnlyCheck().
Referenced by compactFiles(), and resumeFileCompaction().
|
virtual |
Reimplemented in File_Namespace::CachingFileMgr.
Definition at line 700 of file FileMgr.cpp.
References fileMgrKey_.
Referenced by checkpoint(), and setEpoch().
|
inlinevirtual |
Returns current value of epoch - should be one greater than recorded at last checkpoint. Because FileMgr only contains buffers from one table we can just return the FileMgr's epoch instead of finding a table-specific epoch.
Reimplemented in File_Namespace::CachingFileMgr.
Definition at line 281 of file FileMgr.h.
References epoch().
Referenced by epoch(), File_Namespace::FileBuffer::getFileMgrEpoch(), and File_Namespace::FileInfo::openExistingFile().
|
inlineprivate |
Definition at line 530 of file FileMgr.h.
Referenced by checkpoint(), init(), openAndReadLegacyEpochFile(), updatePageIfDeleted(), and writeDirtyBuffers().
|
inline |
Definition at line 283 of file FileMgr.h.
Referenced by setDataAndMetadataFileStats().
|
inlinevirtual |
True if a read error should cause a fatal error.
Reimplemented in File_Namespace::CachingFileMgr.
Definition at line 366 of file FileMgr.h.
Referenced by File_Namespace::FileBuffer::FileBuffer().
|
override |
Definition at line 797 of file FileMgr.cpp.
References CHECK, Data_Namespace::AbstractBuffer::copyTo(), logger::FATAL, getBuffer(), Data_Namespace::AbstractBuffer::isDirty(), LOG, show_chunk(), and Data_Namespace::AbstractBuffer::size().
|
override |
Definition at line 873 of file FileMgr.cpp.
References logger::FATAL, and LOG.
Referenced by copyPage().
|
virtual |
Reimplemented in File_Namespace::CachingFileMgr.
Definition at line 1210 of file FileMgr.cpp.
References free_pages_, and mutex_free_page_.
Referenced by File_Namespace::FileInfo::freePage(), and freePages().
|
protected |
Definition at line 1615 of file FileMgr.cpp.
References free_page(), free_pages_, and mutex_free_page_.
Referenced by checkpoint(), File_Namespace::CachingFileMgr::clearForTable(), File_Namespace::CachingFileMgr::init(), init(), and sortAndCopyFilePagesForCompaction().
|
private |
Definition at line 673 of file FileMgr.cpp.
References chunkIndex_, chunkIndexMutex_, and freePagesBeforeEpochUnlocked().
Referenced by rollOffOldData().
|
private |
Definition at line 678 of file FileMgr.cpp.
References gpu_enabled::upper_bound().
Referenced by freePagesBeforeEpoch().
|
inline |
Definition at line 341 of file FileMgr.h.
Referenced by updatePageIfDeleted().
|
inlineoverride |
|
override |
Returns the a pointer to the chunk with the specified key.
Definition at line 785 of file FileMgr.cpp.
References chunkIndexMutex_, and getBufferUnlocked().
Referenced by fetchBuffer().
|
protectedvirtual |
Reimplemented in File_Namespace::CachingFileMgr.
Definition at line 790 of file FileMgr.cpp.
References CHECK, chunkIndex_, and show_chunk().
Referenced by getBuffer(), and getOrCreateBuffer().
|
override |
Definition at line 1021 of file FileMgr.cpp.
References chunkIndex_, and chunkIndexMutex_.
bool File_Namespace::FileMgr::getDBConvert | ( | ) | const |
Index for looking up chunks.
Definition at line 1052 of file FileMgr.cpp.
References File_Namespace::GlobalFileMgr::getDBConvert(), and gfm_.
FILE * File_Namespace::FileMgr::getFileForFileId | ( | const int32_t | fileId | ) |
Returns FILE pointer associated with requested fileId.
Definition at line 1003 of file FileMgr.cpp.
Referenced by File_Namespace::FileBuffer::readMetadata(), and File_Namespace::FileBuffer::writeMetadata().
|
inline |
Definition at line 229 of file FileMgr.h.
Referenced by File_Namespace::FileBuffer::append(), File_Namespace::FileBuffer::copyPage(), copyPage(), copyPageWithoutHeaderSize(), createFileInfo(), File_Namespace::FileBuffer::freePage(), openExistingFile(), File_Namespace::readForThread(), requestFreePage(), requestFreePages(), updateMappedPagesVisibility(), File_Namespace::FileBuffer::write(), and File_Namespace::FileBuffer::writeHeader().
|
inline |
Definition at line 334 of file FileMgr.h.
Referenced by File_Namespace::CachingFileMgr::closeRemovePhysical(), closeRemovePhysical(), and File_Namespace::CachingFileMgr::getTableFileMgrPath().
boost::filesystem::path File_Namespace::FileMgr::getFilePath | ( | const std::string & | file_name | ) | const |
Definition at line 1697 of file FileMgr.cpp.
References fileMgrBasePath_.
Referenced by compactFiles(), deleteEmptyFiles(), readPageMappingsFromStatusFile(), renameCompactionStatusFile(), resumeFileCompaction(), and writePageMappingsToStatusFile().
|
private |
Definition at line 407 of file FileMgr.cpp.
References CHUNK_KEY_FRAGMENT_IDX, chunkIndex_, and chunkIndexMutex_.
Referenced by getStorageStats().
|
inlineoverride |
|
inlineoverride |
FileMetadata File_Namespace::FileMgr::getMetadataForFile | ( | const boost::filesystem::directory_iterator & | fileIterator | ) | const |
Definition at line 157 of file FileMgr.cpp.
References CHECK_EQ, DATA_FILE_EXT, logger::FATAL, File_Namespace::FileMetadata::file_id, File_Namespace::FileMetadata::file_path, heavyai::file_size(), File_Namespace::FileMetadata::file_size, File_Namespace::FileMetadata::is_data_file, LOG, File_Namespace::FileMetadata::num_pages, and File_Namespace::FileMetadata::page_size.
Referenced by init(), openFiles(), and setDataAndMetadataFileStats().
|
inline |
Definition at line 369 of file FileMgr.h.
|
inlineoverride |
|
override |
Definition at line 1692 of file FileMgr.cpp.
References chunkIndex_, and chunkIndexMutex_.
|
inline |
Returns number of threads defined by parameter num-reader-threads which should be used during initial load and consequent read of data.
Definition at line 316 of file FileMgr.h.
Referenced by File_Namespace::FileBuffer::read().
size_t File_Namespace::FileMgr::getNumUsedMetadataPagesForChunkKey | ( | const ChunkKey & | chunkKey | ) | const |
Definition at line 1042 of file FileMgr.cpp.
References chunkIndex_, and chunkIndexMutex_.
|
private |
Definition at line 1670 of file FileMgr.cpp.
References chunkIndex_, chunkIndexMutex_, createBufferUnlocked(), and getBufferUnlocked().
Referenced by putBuffer().
|
inline |
StorageStats File_Namespace::FileMgr::getStorageStats | ( | ) | const |
Definition at line 334 of file FileMgr.cpp.
References File_Namespace::StorageStats::fragment_count, getFragmentCount(), isFullyInitted_, and setDataAndMetadataFileStats().
|
inlineoverride |
bool File_Namespace::FileMgr::hasChunkMetadataForKeyPrefix | ( | const ChunkKey & | keyPrefix | ) |
Definition at line 1009 of file FileMgr.cpp.
References chunkIndex_, and chunkIndexMutex_.
|
inlinevirtual |
Reimplemented in File_Namespace::CachingFileMgr.
|
inline |
Definition at line 285 of file FileMgr.h.
References logger::FATAL, LOG, and Epoch::max_allowable_epoch().
Referenced by checkpoint(), and init().
|
private |
Definition at line 252 of file FileMgr.cpp.
References Epoch::ceiling(), CHECK, clearFileInfos(), coreInit(), createBufferFromHeaders(), createEpochFile(), epoch(), epoch_, EPOCH_FILENAME, logger::FATAL, FILE_MGR_VERSION_FILENAME, fileMgrBasePath_, fileMgrVersion_, Epoch::floor(), freePages(), incrementEpoch(), initializeNumThreads(), isFullyInitted_, LATEST_FILE_MGR_VERSION, LOG, nextFileId_, openFiles(), readOnlyCheck(), resumeFileCompaction(), rollOffOldData(), setEpoch(), gpu_enabled::sort(), VLOG, and writeAndSyncVersionToDisk().
Referenced by FileMgr().
|
private |
Definition at line 430 of file FileMgr.cpp.
References threading_serial::async(), CHECK, copyPage(), createBuffer(), createBufferFromHeaders(), EPOCH_FILENAME, logger::FATAL, File_Namespace::FileMetadata::file_id, File_Namespace::FileMetadata::file_path, File_Namespace::GlobalFileMgr::getFileMgr(), getMetadataForFile(), gfm_, File_Namespace::FileMetadata::is_data_file, isFullyInitted_, LOG, nextFileId_, File_Namespace::FileMetadata::num_pages, openAndReadEpochFile(), openExistingFile(), File_Namespace::FileMetadata::page_size, processFileFutures(), File_Namespace::MultiPage::push(), readOnlyCheck(), requestFreePage(), setEpoch(), gpu_enabled::sort(), and Data_Namespace::AbstractBuffer::syncEncoder().
|
protected |
Definition at line 1604 of file FileMgr.cpp.
References num_reader_threads_.
Referenced by File_Namespace::CachingFileMgr::init(), and init().
|
inlineoverride |
|
override |
Definition at line 748 of file FileMgr.cpp.
References chunkIndex_, and chunkIndexMutex_.
|
inline |
Returns value of epoch at last checkpoint.
Definition at line 301 of file FileMgr.h.
Referenced by File_Namespace::GlobalFileMgr::existsDiffBetweenFileMgrParamsAndFileMgr(), and setDataAndMetadataFileStats().
|
inline |
Returns value max_rollback_epochs.
Definition at line 310 of file FileMgr.h.
Referenced by File_Namespace::GlobalFileMgr::existsDiffBetweenFileMgrParamsAndFileMgr().
|
protected |
Definition at line 1116 of file FileMgr.cpp.
References Epoch::ceiling(), createEpochFile(), epoch_, EPOCH_FILENAME, FILE_MGR_VERSION_FILENAME, fileMgrBasePath_, Epoch::floor(), logger::INFO, LEGACY_EPOCH_FILENAME, LOG, Epoch::min_allowable_epoch(), openAndReadLegacyEpochFile(), readOnlyCheck(), writeAndSyncEpochToDisk(), and writeAndSyncVersionToDisk().
Referenced by migrateToLatestFileMgrVersion().
|
protected |
Definition at line 1128 of file FileMgr.cpp.
References FILE_MGR_VERSION_FILENAME, fileMgrBasePath_, logger::INFO, LOG, readOnlyCheck(), renameAndSymlinkLegacyFiles(), and writeAndSyncVersionToDisk().
Referenced by migrateToLatestFileMgrVersion().
|
protected |
Definition at line 1157 of file FileMgr.cpp.
References logger::FATAL, FILE_MGR_VERSION_FILENAME, fileMgrVersion_, INVALID_VERSION, LATEST_FILE_MGR_VERSION, LOG, migrateEpochFileV0(), migrateLegacyFilesV1(), readVersionFromDisk(), UNREACHABLE, and writeAndSyncVersionToDisk().
Referenced by coreInit().
|
protected |
Definition at line 639 of file FileMgr.cpp.
References Epoch::byte_size(), epoch_, epochFile_, logger::FATAL, heavyai::file_size(), fileMgrBasePath_, LOG, File_Namespace::open(), File_Namespace::read(), and Epoch::storage_ptr().
Referenced by coreInit(), and init().
|
protected |
Definition at line 618 of file FileMgr.cpp.
References File_Namespace::close(), epoch(), logger::FATAL, heavyai::file_size(), fileMgrBasePath_, LOG, File_Namespace::open(), and File_Namespace::read().
Referenced by migrateEpochFileV0().
|
protected |
Definition at line 946 of file FileMgr.cpp.
References CHECK, f(), fileIndex_, files_, files_rw_mutex_, getFileInfoForFileId(), and File_Namespace::open().
Referenced by init(), and openFiles().
|
protected |
Definition at line 200 of file FileMgr.cpp.
References threading_serial::async(), Epoch::ceiling(), CHECK, File_Namespace::OpenFilesResult::compaction_status_file_name, epoch_, File_Namespace::FileMetadata::file_id, File_Namespace::FileMetadata::file_path, fileMgrBasePath_, getMetadataForFile(), File_Namespace::OpenFilesResult::header_infos, logger::INFO, File_Namespace::anonymous_namespace{FileMgr.cpp}::is_compaction_status_file(), File_Namespace::FileMetadata::is_data_file, LOG, File_Namespace::OpenFilesResult::max_file_id, File_Namespace::FileMetadata::num_pages, openExistingFile(), File_Namespace::FileMetadata::page_size, processFileFutures(), run_benchmark_import::result, timer_start(), and timer_stop().
Referenced by File_Namespace::CachingFileMgr::init(), and init().
|
inlineoverride |
|
protected |
Definition at line 416 of file FileMgr.cpp.
Referenced by init(), and openFiles().
|
override |
Puts the contents of d into the Chunk with the given key.
key | - Unique identifier for a Chunk. |
d | - An object representing the source data for the Chunk. |
Definition at line 816 of file FileMgr.cpp.
References CHECK, CHECK_LT, Data_Namespace::AbstractBuffer::clearDirtyBits(), logger::FATAL, Data_Namespace::AbstractBuffer::getDeviceId(), Data_Namespace::AbstractBuffer::getMemoryPtr(), getOrCreateBuffer(), Data_Namespace::AbstractBuffer::getType(), Data_Namespace::AbstractBuffer::isAppended(), Data_Namespace::AbstractBuffer::isDirty(), Data_Namespace::AbstractBuffer::isUpdated(), LOG, show_chunk(), and Data_Namespace::AbstractBuffer::size().
|
privatevirtual |
Reimplemented in File_Namespace::CachingFileMgr.
Definition at line 1723 of file FileMgr.cpp.
References CHECK, and g_read_only.
Referenced by closeRemovePhysical(), compactFiles(), createEpochFile(), createFile(), createFileInfo(), deleteEmptyFiles(), init(), migrateEpochFileV0(), migrateLegacyFilesV1(), renameCompactionStatusFile(), resumeFileCompaction(), writeAndSyncVersionToDisk(), writeFile(), and writePageMappingsToStatusFile().
|
protected |
Deserializes a page mapping vector from expected status file.
Definition at line 1547 of file FileMgr.cpp.
References CHECK, CHECK_EQ, CHECK_GE, heavyai::file_size(), getFilePath(), and UPDATE_PAGE_VISIBILITY_STATUS.
Referenced by resumeFileCompaction().
|
protected |
Definition at line 1073 of file FileMgr.cpp.
References File_Namespace::close(), heavyai::file_size(), fileMgrBasePath_, INVALID_VERSION, File_Namespace::open(), File_Namespace::read(), and setup::version.
Referenced by createOrMigrateTopLevelMetadata(), migrateToLatestFileMgrVersion(), and writeAndSyncVersionToDisk().
|
override |
Definition at line 1215 of file FileMgr.cpp.
References UNREACHABLE.
|
static |
Definition at line 1136 of file FileMgr.cpp.
References DATA_FILE_EXT, logger::INFO, File_Namespace::kLegacyDataFileExtension, and LOG.
Referenced by migrateLegacyFilesV1(), and anonymous_namespace{TableArchiver.cpp}::rename_table_directories().
void File_Namespace::FileMgr::renameCompactionStatusFile | ( | const char *const | from_status, |
const char *const | to_status | ||
) |
Renames a given status file name to a new given file name.
Definition at line 1574 of file FileMgr.cpp.
References CHECK, getFilePath(), and readOnlyCheck().
Referenced by compactFiles(), and resumeFileCompaction().
|
virtual |
Reimplemented in File_Namespace::CachingFileMgr.
Definition at line 877 of file FileMgr.cpp.
References CHECK, createFileInfo(), File_Namespace::FileInfo::fileId, fileIndex_, getFileInfoForFileId(), File_Namespace::FileInfo::getFreePage(), getPageMutex_, num_pages_per_data_file_, and num_pages_per_metadata_file_.
Referenced by File_Namespace::FileBuffer::addNewMultiPage(), init(), File_Namespace::FileBuffer::write(), and File_Namespace::FileBuffer::writeMetadata().
void File_Namespace::FileMgr::requestFreePages | ( | size_t | npages, |
size_t | pagesize, | ||
std::vector< Page > & | pages, | ||
const bool | isMetadata | ||
) |
Obtains free pages – creates new files if necessary – of the requested size.
Given a page size and number of pages, this method updates the vector "pages" to include free pages of the requested size. These pages are immediately removed from the free list of the affected file(s). If there are not enough pages available among current files, new files are created and their pages are included in the vector.
npages | The number of free pages requested |
pagesize | The size of each requested page |
pages | A vector containing the free pages obtained by this method |
Definition at line 901 of file FileMgr.cpp.
References CHECK, createFileInfo(), File_Namespace::FileInfo::fileId, fileIndex_, getFileInfoForFileId(), File_Namespace::FileInfo::getFreePage(), getPageMutex_, num_pages_per_data_file_, and num_pages_per_metadata_file_.
|
protected |
Resumes an interrupted file compaction process. This method would normally only be called when re-initializing the file manager after a crash occurred in the middle of file compaction.
Definition at line 1224 of file FileMgr.cpp.
References CHECK, compactFiles(), COPY_PAGES_STATUS, DELETE_EMPTY_FILES_STATUS, deleteEmptyFiles(), files_rw_mutex_, getFilePath(), readOnlyCheck(), readPageMappingsFromStatusFile(), renameCompactionStatusFile(), UNREACHABLE, UPDATE_PAGE_VISIBILITY_STATUS, and updateMappedPagesVisibility().
Referenced by init().
|
private |
Definition at line 687 of file FileMgr.cpp.
References checkpoint(), epoch_, Epoch::floor(), freePagesBeforeEpoch(), and maxRollbackEpochs_.
Referenced by checkpoint(), and init().
|
private |
Definition at line 343 of file FileMgr.cpp.
References CHECK, File_Namespace::StorageStats::data_file_count, File_Namespace::StorageStats::epoch, File_Namespace::StorageStats::epoch_floor, epochFloor(), logger::FATAL, File_Namespace::FileMetadata::file_size, fileMgrBasePath_, files_, files_rw_mutex_, getMetadataForFile(), File_Namespace::FileMetadata::is_data_file, File_Namespace::anonymous_namespace{FileMgr.cpp}::is_metadata_file(), isFullyInitted_, lastCheckpointedEpoch(), LOG, File_Namespace::StorageStats::metadata_file_count, metadata_page_size_, File_Namespace::FileMetadata::num_pages, num_pages_per_metadata_file_, File_Namespace::FileMetadata::page_size, File_Namespace::StorageStats::total_data_file_size, File_Namespace::StorageStats::total_data_page_count, File_Namespace::StorageStats::total_free_data_page_count, File_Namespace::StorageStats::total_free_metadata_page_count, File_Namespace::StorageStats::total_metadata_file_size, and File_Namespace::StorageStats::total_metadata_page_count.
Referenced by getStorageStats().
|
protected |
Definition at line 1199 of file FileMgr.cpp.
References Epoch::ceiling(), describeSelf(), epoch_, Epoch::floor(), and writeAndSyncEpochToDisk().
Referenced by init().
|
static |
Definition at line 1588 of file FileMgr.cpp.
References num_pages_per_data_file_.
|
static |
Definition at line 1592 of file FileMgr.cpp.
References num_pages_per_metadata_file_.
|
protected |
Sorts all files with the given page size in ascending order of number of free pages. Then copy over pages from files with more free pages to those with less free pages. Leave destination/copied to pages as free when copying. Record copied source and destination pages in page mapping.
Definition at line 1316 of file FileMgr.cpp.
References CHECK, copySourcePageForCompaction(), File_Namespace::Page::fileId, fileIndex_, files_, File_Namespace::FileInfo::freePages, freePages(), and gpu_enabled::sort().
Referenced by compactFiles().
|
protected |
Definition at line 1596 of file FileMgr.cpp.
References CHECK, files_, and files_rw_mutex_.
Referenced by checkpoint().
|
protected |
Goes through the given page mapping and marks source/copied from pages as free while marking destination/copied to pages as used (by setting the header size).
Definition at line 1471 of file FileMgr.cpp.
References CHECK_GT, logger::FATAL, files_, getFileInfoForFileId(), and LOG.
Referenced by compactFiles(), and resumeFileCompaction().
|
virtual |
deletes or recovers a page based on last checkpointed epoch.
Reimplemented in File_Namespace::CachingFileMgr.
Definition at line 1637 of file FileMgr.cpp.
References CHUNK_KEY_DB_IDX, CHUNK_KEY_TABLE_IDX, epoch(), File_Namespace::FileInfo::freePageImmediate(), g_multi_instance, g_read_only, get_fileMgrKey(), File_Namespace::is_page_deleted_with_checkpoint(), File_Namespace::is_page_deleted_without_checkpoint(), and File_Namespace::FileInfo::recoverPage().
Referenced by File_Namespace::FileInfo::openExistingFile().
|
protected |
Definition at line 659 of file FileMgr.cpp.
References Epoch::byte_size(), CHECK, epoch_, epochFile_, epochIsCheckpointed_, heavyai::fsync(), Epoch::storage_ptr(), and writeFile().
Referenced by checkpoint(), createEpochFile(), migrateEpochFileV0(), and setEpoch().
|
protected |
Definition at line 1087 of file FileMgr.cpp.
References File_Namespace::close(), File_Namespace::create(), epochFile_, logger::FATAL, fileMgrBasePath_, heavyai::fsync(), logger::INFO, LOG, File_Namespace::open(), readOnlyCheck(), readVersionFromDisk(), and File_Namespace::write().
Referenced by createOrMigrateTopLevelMetadata(), init(), migrateEpochFileV0(), migrateLegacyFilesV1(), and migrateToLatestFileMgrVersion().
|
private |
Definition at line 1682 of file FileMgr.cpp.
References chunkIndex_, chunkIndexMutex_, and epoch().
Referenced by checkpoint().
size_t File_Namespace::FileMgr::writeFile | ( | FILE * | f, |
const size_t | offset, | ||
const size_t | size, | ||
const int8_t * | buf | ||
) | const |
Definition at line 1715 of file FileMgr.cpp.
References readOnlyCheck(), and File_Namespace::write().
Referenced by File_Namespace::FileInfo::write(), and writeAndSyncEpochToDisk().
void File_Namespace::FileMgr::writePageMappingsToStatusFile | ( | const std::vector< PageMapping > & | page_mappings | ) |
Serializes a page mapping vector to expected status file. Page mapping vector is serialized in the following format: [{page mapping vector size}, {page mapping vector data bytes ...}]
Definition at line 1528 of file FileMgr.cpp.
References CHECK, COPY_PAGES_STATUS, getFilePath(), and readOnlyCheck().
Referenced by compactFiles().
|
friend |
ChunkKeyToChunkMap File_Namespace::FileMgr::chunkIndex_ |
Definition at line 330 of file FileMgr.h.
Referenced by createBuffer(), createBufferFromHeaders(), createBufferUnlocked(), deleteBuffer(), deleteBuffersWithPrefix(), deleteBufferUnlocked(), File_Namespace::CachingFileMgr::dump(), freePagesBeforeEpoch(), getBufferUnlocked(), getChunkMetadataVecForKeyPrefix(), File_Namespace::CachingFileMgr::getChunkSpaceReservedByTable(), getFragmentCount(), File_Namespace::CachingFileMgr::getMetadataSpaceReservedByTable(), getNumChunks(), getNumUsedMetadataPagesForChunkKey(), getOrCreateBuffer(), hasChunkMetadataForKeyPrefix(), isBufferOnDevice(), writeDirtyBuffers(), File_Namespace::GlobalFileMgr::writeFileMgrData(), and ~FileMgr().
|
mutableprotected |
Definition at line 420 of file FileMgr.h.
Referenced by createBuffer(), createBufferFromHeaders(), deleteBuffer(), deleteBuffersWithPrefix(), freePagesBeforeEpoch(), getBuffer(), getChunkMetadataVecForKeyPrefix(), File_Namespace::CachingFileMgr::getChunkSpaceReservedByTable(), getFragmentCount(), File_Namespace::CachingFileMgr::getMetadataSpaceReservedByTable(), getNumChunks(), getNumUsedMetadataPagesForChunkKey(), getOrCreateBuffer(), hasChunkMetadataForKeyPrefix(), isBufferOnDevice(), and writeDirtyBuffers().
|
static |
Definition at line 388 of file FileMgr.h.
Referenced by compactFiles(), File_Namespace::anonymous_namespace{FileMgr.cpp}::is_compaction_status_file(), resumeFileCompaction(), and writePageMappingsToStatusFile().
|
static |
Definition at line 401 of file FileMgr.h.
Referenced by createOrMigrateTopLevelMetadata().
|
protected |
Definition at line 418 of file FileMgr.h.
Referenced by closePhysicalUnlocked(), and ~FileMgr().
|
static |
|
static |
Definition at line 385 of file FileMgr.h.
Referenced by File_Namespace::CachingFileMgr::getMinimumSize().
|
static |
Definition at line 390 of file FileMgr.h.
Referenced by compactFiles(), deleteEmptyFiles(), File_Namespace::anonymous_namespace{FileMgr.cpp}::is_compaction_status_file(), and resumeFileCompaction().
|
private |
Definition at line 542 of file FileMgr.h.
Referenced by FileMgr(), init(), migrateEpochFileV0(), openAndReadEpochFile(), openFiles(), rollOffOldData(), setEpoch(), and writeAndSyncEpochToDisk().
|
static |
Definition at line 400 of file FileMgr.h.
Referenced by coreInit(), init(), and migrateEpochFileV0().
|
private |
Definition at line 544 of file FileMgr.h.
Referenced by closePhysicalUnlocked(), createEpochFile(), FileMgr(), openAndReadEpochFile(), writeAndSyncEpochToDisk(), writeAndSyncVersionToDisk(), and ~FileMgr().
|
private |
Definition at line 543 of file FileMgr.h.
Referenced by writeAndSyncEpochToDisk().
|
static |
Definition at line 402 of file FileMgr.h.
Referenced by init(), migrateEpochFileV0(), migrateLegacyFilesV1(), and migrateToLatestFileMgrVersion().
|
protected |
Definition at line 414 of file FileMgr.h.
Referenced by clearFileInfos(), createFileInfo(), openExistingFile(), requestFreePage(), requestFreePages(), and sortAndCopyFilePagesForCompaction().
|
protected |
Definition at line 411 of file FileMgr.h.
Referenced by File_Namespace::CachingFileMgr::CachingFileMgr(), coreInit(), createEpochFile(), createFileInfo(), deleteEmptyFiles(), FileMgr(), getFilePath(), init(), migrateEpochFileV0(), migrateLegacyFilesV1(), openAndReadEpochFile(), openAndReadLegacyEpochFile(), openFiles(), File_Namespace::CachingFileMgr::readTableFileMgrs(), readVersionFromDisk(), setDataAndMetadataFileStats(), and writeAndSyncVersionToDisk().
|
private |
Global FileMgr.
Definition at line 540 of file FileMgr.h.
Referenced by coreInit(), describeSelf(), and FileMgr().
|
protected |
the index of the next file id
Definition at line 417 of file FileMgr.h.
Referenced by init(), and migrateToLatestFileMgrVersion().
|
protected |
The OS file system path containing files related to this FileMgr
Definition at line 413 of file FileMgr.h.
Referenced by clearFileInfos(), closePhysicalUnlocked(), compactFiles(), createFileInfo(), deleteEmptyFiles(), FileMgr(), getFileForFileId(), openExistingFile(), setDataAndMetadataFileStats(), sortAndCopyFilePagesForCompaction(), syncFilesToDisk(), updateMappedPagesVisibility(), and ~FileMgr().
|
mutableprotected |
Definition at line 421 of file FileMgr.h.
Referenced by File_Namespace::CachingFileMgr::closeRemovePhysical(), closeRemovePhysical(), compactFiles(), coreInit(), createFileInfo(), openExistingFile(), resumeFileCompaction(), setDataAndMetadataFileStats(), and syncFilesToDisk().
|
protected |
Definition at line 424 of file FileMgr.h.
Referenced by free_page(), and freePages().
|
protected |
pointer to DB level metadata
Definition at line 419 of file FileMgr.h.
Referenced by requestFreePage(), and requestFreePages().
|
private |
Definition at line 539 of file FileMgr.h.
Referenced by coreInit(), createOrMigrateTopLevelMetadata(), FileMgr(), getDBConvert(), and init().
|
static |
Definition at line 403 of file FileMgr.h.
Referenced by createOrMigrateTopLevelMetadata(), migrateToLatestFileMgrVersion(), and readVersionFromDisk().
|
protected |
Definition at line 425 of file FileMgr.h.
Referenced by getStorageStats(), File_Namespace::CachingFileMgr::init(), init(), and setDataAndMetadataFileStats().
|
static |
Definition at line 404 of file FileMgr.h.
Referenced by init(), and migrateToLatestFileMgrVersion().
|
static |
Definition at line 399 of file FileMgr.h.
Referenced by migrateEpochFileV0().
|
protected |
Definition at line 410 of file FileMgr.h.
Referenced by File_Namespace::CachingFileMgr::CachingFileMgr(), and rollOffOldData().
|
protected |
Definition at line 552 of file FileMgr.h.
Referenced by File_Namespace::CachingFileMgr::getMetadataFileSize(), File_Namespace::CachingFileMgr::getMetadataSpaceReservedByTable(), and setDataAndMetadataFileStats().
|
mutableprotected |
Definition at line 423 of file FileMgr.h.
Referenced by free_page(), and freePages().
|
protected |
number of threads used when loading data
Definition at line 416 of file FileMgr.h.
Referenced by File_Namespace::CachingFileMgr::CachingFileMgr(), createFileInfo(), File_Namespace::CachingFileMgr::init(), and init().
|
staticprotected |
Definition at line 427 of file FileMgr.h.
Referenced by File_Namespace::CachingFileMgr::getDataFileSize(), requestFreePage(), requestFreePages(), and setNumPagesPerDataFile().
|
staticprotected |
Definition at line 428 of file FileMgr.h.
Referenced by File_Namespace::CachingFileMgr::getMetadataFileSize(), requestFreePage(), requestFreePages(), setDataAndMetadataFileStats(), and setNumPagesPerMetadataFile().
|
protected |
Maps page sizes to FileInfo objects.
Definition at line 415 of file FileMgr.h.
Referenced by initializeNumThreads().
|
protected |
Definition at line 551 of file FileMgr.h.
Referenced by copyPage(), createBufferUnlocked(), File_Namespace::CachingFileMgr::getChunkSpaceReservedByTable(), File_Namespace::CachingFileMgr::getDataFileSize(), and File_Namespace::CachingFileMgr::getPageSize().
|
static |
Definition at line 389 of file FileMgr.h.
Referenced by compactFiles(), File_Namespace::anonymous_namespace{FileMgr.cpp}::is_compaction_status_file(), readPageMappingsFromStatusFile(), and resumeFileCompaction().