Zero  0.1.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm > Class Template Reference

TODO. More...

#include <page_evictioner_lean_store.hpp>

Inheritance diagram for zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >:
zero::buffer_pool::PageEvictioner worker_thread_t thread_wrapper_t

Public Member Functions

 PageEvictionerLeanStore (const BufferPool *bufferPool)
 TODO. More...
 
 ~PageEvictionerLeanStore () final
 TODO. More...
 
bf_idx pickVictim () noexcept final
 Selects a page to be evicted from the buffer pool. More...
 
void updateOnPageHit (bf_idx idx) noexcept final
 Updates the eviction statistics on page hit. More...
 
void updateOnPageUnfix (bf_idx idx) noexcept final
 Updates the eviction statistics on page unfix. More...
 
void updateOnPageMiss (bf_idx idx, PageID pid) noexcept final
 Updates the eviction statistics on page miss. More...
 
void updateOnPageFixed (bf_idx idx) noexcept final
 Updates the eviction statistics of fixed (i.e. used) pages during eviction. More...
 
void updateOnPageBlocked (bf_idx idx) noexcept final
 Updates the eviction statistics of pages that cannot be evicted at all. More...
 
void updateOnPageSwizzled (bf_idx idx) noexcept final
 Updates the eviction statistics of pages containing swizzled pointers during eviction. More...
 
void updateOnPageExplicitlyUnbuffered (bf_idx idx) noexcept final
 Updates the eviction statistics on explicit unbuffer. More...
 
void updateOnPointerSwizzling (bf_idx idx) noexcept final
 Updates the eviction statistics of pages when its pointer got swizzled in its parent page. More...
 
void releaseInternalLatches () noexcept final
 Releases the internal latches of. More...
 
- Public Member Functions inherited from zero::buffer_pool::PageEvictioner
 PageEvictioner (const BufferPool *bufferPool)
 Constructs an abstract page evictioner. More...
 
 PageEvictioner (const PageEvictioner &)=delete
 Explicitly deleted copy constructor of an abstract page evictioner. More...
 
PageEvictioneroperator= (const PageEvictioner &)=delete
 Explicitly deleted assignment operator of an abstract page evictioner. More...
 
virtual ~PageEvictioner ()
 Destructs an abstract page evictioner. More...
 
virtual void updateOnPageDirty (bf_idx idx) noexcept=0
 Updates the eviction statistics of dirty pages during eviction. More...
 
bool evictOne (bf_idx &victim)
 Evicts a page from the buffer pool. More...
 
- Public Member Functions inherited from worker_thread_t
 worker_thread_t (int inverval_ms=-1)
 
virtual ~worker_thread_t ()
 
void wakeup (bool wait=false, int rounds_to_wait=-1)
 
void stop ()
 
void wait_for_round (long round=0)
 
long get_rounds_completed () const
 
bool is_busy () const
 
- Public Member Functions inherited from thread_wrapper_t
 thread_wrapper_t ()
 
virtual ~thread_wrapper_t ()
 
virtual void before_run ()
 
virtual void after_run ()
 
void spawn ()
 
void fork ()
 
void join ()
 

Private Member Functions

void fillCoolingStage ()
 TODO. More...
 

Private Attributes

hashtable_deque::HashtableDeque< bf_idx, 0x80000001u > _coolingStage
 TODO. More...
 
bf_idx _coolingStageSize
 TODO. More...
 
std::recursive_mutex _coolingStageLock
 TODO. More...
 
std::vector< std::atomic< bool > > _notEvictable
 TODO. More...
 
bf_idx _maxBufferpoolIndex
 TODO. More...
 
splitmix32 _randomNumberGenerator
 TODO. More...
 
uniform_int_distribution::biased_uniform_int_distribution< bf_idx_randomDistribution
 TODO. More...
 

Additional Inherited Members

- Protected Member Functions inherited from zero::buffer_pool::PageEvictioner
bool _doEviction (bf_idx victim) noexcept
 Evicts a page from the buffer pool. More...
 
- Protected Member Functions inherited from worker_thread_t
bool should_exit () const
 
void notify_one ()
 
void notify_all ()
 
void quit ()
 
- Protected Attributes inherited from zero::buffer_pool::PageEvictioner
const bool _maintainEMLSN
 Maintain the page's EMLSNs on eviction. More...
 
const bool _flushDirty
 Flush dirty pages. More...
 
const bool _logEvictions
 Log page evictions. More...
 
const uint_fast32_t _evictionBatchSize
 Target value of free buffer frames. More...
 
const uint_fast32_t _maxAttempts
 Maximum number of unsuccessful picks of eviction victims. More...
 
const uint_fast32_t _wakeupCleanerAttempts = 42
 Number of unsuccessful picks of eviction victims before waking up the page cleaner. More...
 
- Static Protected Attributes inherited from zero::buffer_pool::PageEvictioner
static constexpr bool _enabledSwizzling = POINTER_SWIZZLER::usesPointerSwizzling
 Pointer swizzling used in the buffer pool. More...
 

Detailed Description

template<uint32_t cooling_stage_size_ppm>
class zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >

TODO.

TODO

Template Parameters
cooling_stage_size_ppmTODO

Constructor & Destructor Documentation

§ PageEvictionerLeanStore()

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::PageEvictionerLeanStore ( const BufferPool bufferPool)
inline

TODO.

TODO

Parameters
bufferPoolTODO

§ ~PageEvictionerLeanStore()

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::~PageEvictionerLeanStore ( )
inlinefinal

TODO.

Member Function Documentation

§ fillCoolingStage()

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::fillCoolingStage ( )
inlineprivate

TODO.

TODO

§ pickVictim()

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::pickVictim ( )
inlinefinalvirtualnoexcept

Selects a page to be evicted from the buffer pool.

TODO

Returns
The buffer frame that can be freed or 0 if no eviction victim could be found.

Implements zero::buffer_pool::PageEvictioner.

§ releaseInternalLatches()

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::releaseInternalLatches ( )
inlinefinalvirtualnoexcept

Releases the internal latches of.

TODO

Implements zero::buffer_pool::PageEvictioner.

§ updateOnPageBlocked()

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::updateOnPageBlocked ( bf_idx  idx)
inlinefinalvirtualnoexcept

Updates the eviction statistics of pages that cannot be evicted at all.

TODO

Parameters
idxThe buffer frame index of the BufferPool which corresponding frame contains a page that cannot be evicted at all.

Implements zero::buffer_pool::PageEvictioner.

§ updateOnPageExplicitlyUnbuffered()

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::updateOnPageExplicitlyUnbuffered ( bf_idx  idx)
inlinefinalvirtualnoexcept

Updates the eviction statistics on explicit unbuffer.

TODO

Parameters
idxThe buffer frame index of the BufferPool whose corresponding frame is freed explicitly.

Implements zero::buffer_pool::PageEvictioner.

§ updateOnPageFixed()

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::updateOnPageFixed ( bf_idx  idx)
inlinefinalvirtualnoexcept

Updates the eviction statistics of fixed (i.e. used) pages during eviction.

TODO

Parameters
idxThe buffer frame index of the BufferPool that was picked for eviction while the corresponding frame was fixed.

Implements zero::buffer_pool::PageEvictioner.

§ updateOnPageHit()

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::updateOnPageHit ( bf_idx  idx)
inlinefinalvirtualnoexcept

Updates the eviction statistics on page hit.

TODO

Parameters
idxThe buffer frame index of the BufferPool on which a page hit occurred.

Implements zero::buffer_pool::PageEvictioner.

§ updateOnPageMiss()

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::updateOnPageMiss ( bf_idx  idx,
PageID  pid 
)
inlinefinalvirtualnoexcept

Updates the eviction statistics on page miss.

TODO

Parameters
idxThe buffer frame index of the BufferPool on which a page miss occurred.
pidThe PageID of the generic_page that was loaded into the buffer frame with index idx .

Implements zero::buffer_pool::PageEvictioner.

§ updateOnPageSwizzled()

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::updateOnPageSwizzled ( bf_idx  idx)
inlinefinalvirtualnoexcept

Updates the eviction statistics of pages containing swizzled pointers during eviction.

TODO

Parameters
idxThe buffer frame index of the BufferPool that was picked for eviction while the corresponding frame contained a page with swizzled pointers.

Implements zero::buffer_pool::PageEvictioner.

§ updateOnPageUnfix()

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::updateOnPageUnfix ( bf_idx  idx)
inlinefinalvirtualnoexcept

Updates the eviction statistics on page unfix.

TODO

Parameters
idxThe buffer frame index of the BufferPool on which a page unfix occurred.

Implements zero::buffer_pool::PageEvictioner.

§ updateOnPointerSwizzling()

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::updateOnPointerSwizzling ( bf_idx  idx)
inlinefinalvirtualnoexcept

Updates the eviction statistics of pages when its pointer got swizzled in its parent page.

TODO

Parameters
idxThe buffer frame index of the BufferPool whose pointer got swizzled in its corresponding parent page.

Implements zero::buffer_pool::PageEvictioner.

Member Data Documentation

§ _coolingStage

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::_coolingStage
private

TODO.

TODO

§ _coolingStageLock

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::_coolingStageLock
private

TODO.

§ _coolingStageSize

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::_coolingStageSize
private

TODO.

§ _maxBufferpoolIndex

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::_maxBufferpoolIndex
private

TODO.

§ _notEvictable

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::_notEvictable
private

TODO.

TODO

§ _randomDistribution

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::_randomDistribution
private

TODO.

TODO

§ _randomNumberGenerator

template<uint32_t cooling_stage_size_ppm>
zero::buffer_pool::PageEvictionerLeanStore< cooling_stage_size_ppm >::_randomNumberGenerator
private

TODO.

TODO


The documentation for this class was generated from the following file: