1 #ifndef CATALOG_VOLATILE_CATCACHE_H 
    2 #define CATALOG_VOLATILE_CATCACHE_H 
   20             "voatile catlog cannot be initialized from an existing data " 
   44                                   std::shared_ptr<const TableDesc> tabdesc,
 
  198         std::shared_ptr<const TableDesc> tabdesc,
 
  199         std::shared_ptr<const IndexDesc> idxdesc);
 
BulkLoadIterator is an interface for providing (key, RecordId) pairs for index bulk loading.
Definition: BulkLoadIterator.h:17
 
CatCacheBase implements the common routines and public interfaces for accessing and modifying the sys...
Definition: CatCacheBase.h:103
 
Definition: TableDesc.h:11
 
Definition: VolatileCatCache.h:41
 
CatFileIterator m_iter
Definition: VolatileCatCache.h:64
 
VolatileCatCache * m_vcatcache
Definition: VolatileCatCache.h:63
 
InmemFileBulkLoadIterator(std::shared_ptr< const IndexDesc > idxdesc, std::shared_ptr< const TableDesc > tabdesc, VolatileCatCache *vcatcache, CatFileIterator iter)
Definition: VolatileCatCache.h:43
 
std::shared_ptr< const TableDesc > m_tabdesc
Definition: VolatileCatCache.h:62
 
std::vector< Datum > m_data
Definition: VolatileCatCache.h:65
 
bool Next() override
Subclass should override the Next() function for moving to the next (key, record id) pair.
Definition: VolatileCatCache.cpp:206
 
void EndScan() override
Ends the scan.
Definition: VolatileCatCache.h:56
 
std::shared_ptr< const IndexDesc > m_idxdesc
Definition: VolatileCatCache.h:61
 
Definition: VolatileCatCache.h:12
 
void CloseCatalogFile(FileHandle &fh)
Closes a catalog file pointed by the file handle.
Definition: VolatileCatCache.cpp:40
 
RecordId GetCurrentCatEntryRecordId(CatFileIterator &iter)
Returns the current catalog entry's record ID.
Definition: VolatileCatCache.cpp:149
 
FileHandle OpenCatalogFile(FileId fid, const TableDesc *tabdesc)
Opens a catalog file for access.
Definition: VolatileCatCache.cpp:32
 
void AppendRecord(FileHandle &fh, Record &rec)
Appends a record to the catalog file specified by the file ID.
Definition: VolatileCatCache.cpp:72
 
void UpdateCurrentCatEntry(CatFileIterator &iter, Record &rec)
Updates the current catalog entry pointed by the iterator with the record rec.
Definition: VolatileCatCache.cpp:159
 
CatFileIterator IterateCatEntryFrom(FileHandle &fh, RecordId rid)
Creates an iterator that starts at rid.
Definition: VolatileCatCache.cpp:107
 
void MarkPageDirty(PageHandle &pghandle)
Marks a page pointed by the page handle as dirty.
Definition: VolatileCatCache.cpp:55
 
int PageHandle
An opaque handle for a data page in an unformatted catalog file.
Definition: VolatileCatCache.h:113
 
void InitializeFromExistingData()
Not implemented.
Definition: VolatileCatCache.h:18
 
unique_malloced_ptr m_dbmeta_page
The pointer to the in-memory only dbmeta page.
Definition: VolatileCatCache.h:210
 
void EndIterateCatEntry(CatFileIterator &iter)
Releses any resource associated with the catalog file iterator.
Definition: VolatileCatCache.cpp:188
 
BulkLoadIterator * GetBulkLoadIterator(FileHandle &fh, std::shared_ptr< const TableDesc > tabdesc, std::shared_ptr< const IndexDesc > idxdesc)
Returns a BulkLoadIterator for bulk loading a systable index.
Definition: VolatileCatCache.cpp:193
 
FileId CreateCatalogFile(bool format_heapfile, FieldOffset=0)
Creates a new catalog file and returns its file ID.
Definition: VolatileCatCache.cpp:12
 
FileId FileHandle
An opaque handle for a catalog file.
Definition: VolatileCatCache.h:92
 
const char * GetCurrentCatEntry(CatFileIterator &iter)
Returns the current catalog entry pointed by the iterator as a buffer pointer.
Definition: VolatileCatCache.cpp:137
 
PageHandle GetFirstPage(FileHandle &fh, char **pagebuf)
Returns a handle to the first page in the unformatted catalog file with it pinned in the memory.
Definition: VolatileCatCache.cpp:45
 
bool NextCatEntry(CatFileIterator &iter)
Tries to move the iterator to the next row and returns whether such a row exists.
Definition: VolatileCatCache.cpp:117
 
CatFileIterator IterateCatEntry(FileHandle &fh)
Creates an iterator over the catalog file specified by the file ID.
Definition: VolatileCatCache.cpp:99
 
void ReleasePage(PageHandle &pghandle)
Releases the pin over the page pointed by the page handle.
Definition: VolatileCatCache.cpp:63
 
std::vector< std::unique_ptr< InmemFile > > m_systables
This vector stores all our in-memory only files.
Definition: VolatileCatCache.h:205
 
#define LOG(level,...)
LOG(LogSeverity level, const char *fmt, ...)
Definition: logging.h:116
 
constexpr LogSeverity kError
Definition: logging.h:21
 
int16_t FieldOffset
Definition: tdb_base.h:211
 
uint32_t FileId
The file ID.
Definition: tdb_base.h:221
 
The record ID of a record on a page is a pair of ‘(PageNumber, SlotId)’.
Definition: Record.h:17
 
An opaque handle for iterating a catalog file.
Definition: VolatileCatCache.h:35
 
uint16_t m_nextidx
Definition: VolatileCatCache.h:37
 
uint16_t m_endidx
Definition: VolatileCatCache.h:38
 
FileId m_fid
Definition: VolatileCatCache.h:36
 
Definition: VolatileCatCache.h:25
 
std::vector< bool > m_valid
Definition: VolatileCatCache.h:26
 
std::vector< char > m_bytes
Definition: VolatileCatCache.h:28
 
std::vector< size_t > m_offsets
Definition: VolatileCatCache.h:27
 
std::unique_ptr< void, AlignedAllocImpl::FreeMem > unique_malloced_ptr
Definition: tdb_base.h:94