libfoedus-core
FOEDUS Core Library
Snapshot Cache Manager

Snapshot Cache Manager, which caches data pages retrieved from snapshot files. More...

Detailed Description

Snapshot Cache Manager, which caches data pages retrieved from snapshot files.

Overview

Snapshot Cache is a node-local read-only cache of snapshot pages. In some sense, it is a special kind of bufferpool that is much simpler and faster than traditional implementations due to the special requirements; no modifications, no interaction with logging module nor commit protocol, no guarantee needed for uniqueness (no problem to occasionally have two cached instances of the same page; just a bit waste of space). The operation to retrieve a snapshot page, especially when the page is in this cache, must be VERY fast. Thus, this cache manager must be highly optimized for read operations.

Structure

For each NUMA node memory, we have a hashtable structure whose key is snapshot-id/page-id and whose value is offset in cache memory.

Collaboration diagram for Snapshot Cache Manager:

Files

file  fwd.hpp
 Forward declarations of classes in cache package.
 

Classes

struct  foedus::cache::HashFunc
 A simple hash function logic used in snasphot cache. More...
 
struct  foedus::cache::CacheHashtable::EvictArgs
 Parameters for evict() More...
 
struct  foedus::cache::CacheHashtable::Stat
 
class  foedus::cache::CacheHashtable
 A NUMA-local hashtable of cached snapshot pages. More...
 
class  foedus::cache::CacheManager
 Snapshot cache manager. More...
 
class  foedus::cache::CacheManagerPimpl
 Pimpl object of CacheManager. More...
 
struct  foedus::cache::CacheOptions
 Set of options for snapshot cache manager. More...
 
class  foedus::cache::SnapshotFileSet
 Holds a set of read-only file objects for snapshot files. More...
 

Class Documentation

struct foedus::cache::CacheHashtable::Stat

Definition at line 328 of file cache_hashtable.hpp.

Class Members
uint32_t normal_entries_
uint32_t overflow_entries_