1 #ifndef __ZERO_SM_PAGE_EVICTIONER_HPP 2 #define __ZERO_SM_PAGE_EVICTIONER_HPP 314 #endif // __ZERO_SM_PAGE_EVICTIONER_HPP virtual void updateOnPageHit(bf_idx idx) noexcept=0
Updates the eviction statistics on page hit.
const bool _maintainEMLSN
Maintain the page's EMLSNs on eviction.
Definition: page_evictioner.hpp:219
Definition: worker_thread.h:12
virtual ~PageEvictioner()
Destructs an abstract page evictioner.
Definition: page_evictioner.cpp:22
Control block in the new buffer pool class.
Definition: bf_tree_cb.h:53
virtual void updateOnPageExplicitlyUnbuffered(bf_idx idx) noexcept=0
Updates the eviction statistics on explicit unbuffer.
virtual void updateOnPageMiss(bf_idx idx, PageID pid) noexcept=0
Updates the eviction statistics on page miss.
PageEvictioner(const BufferPool *bufferPool)
Constructs an abstract page evictioner.
Definition: page_evictioner.cpp:12
Definition: buffer_pool.hpp:34
virtual bf_idx pickVictim() noexcept=0
Selects a page to be evicted from the buffer pool.
virtual void updateOnPageSwizzled(bf_idx idx) noexcept=0
Updates the eviction statistics of pages containing swizzled pointers during eviction.
const uint_fast32_t _evictionBatchSize
Target value of free buffer frames.
Definition: page_evictioner.hpp:238
uint32_t bf_idx
Definition: basics.h:56
bool evictOne(bf_idx &victim)
Evicts a page from the buffer pool.
Definition: page_evictioner.cpp:24
void _flushDirtyPage(const bf_tree_cb_t &victimControlBlock) noexcept
Flush the specified page.
Definition: page_evictioner.cpp:256
Page evictioner for the buffer pool.
Definition: page_evictioner.hpp:24
virtual void updateOnPageUnfix(bf_idx idx) noexcept=0
Updates the eviction statistics on page unfix.
uint32_t PageID
Definition: basics.h:45
const uint_fast32_t _maxAttempts
Maximum number of unsuccessful picks of eviction victims.
Definition: page_evictioner.hpp:245
bool _doEviction(bf_idx victim) noexcept
Evicts a page from the buffer pool.
Definition: page_evictioner.cpp:55
const bool _flushDirty
Flush dirty pages.
Definition: page_evictioner.hpp:225
void do_work() override
Function evicting pages in the eviction thread.
Definition: page_evictioner.cpp:272
virtual void updateOnPageFixed(bf_idx idx) noexcept=0
Updates the eviction statistics of fixed (i.e. used) pages during eviction.
PageEvictioner & operator=(const PageEvictioner &)=delete
Explicitly deleted assignment operator of an abstract page evictioner.
A buffer manager that exploits the tree structure of indexes.
Definition: buffer_pool.hpp:40
const uint_fast32_t _wakeupCleanerAttempts
Number of unsuccessful picks of eviction victims before waking up the page cleaner.
Definition: page_evictioner.hpp:254
bool _unswizzleAndUpdateEMLSN(bf_idx victim) noexcept
Unswizzles the pointer in the parent page and updates the EMLSN of that page.
Definition: page_evictioner.cpp:153
virtual void releaseInternalLatches() noexcept=0
Releases the internal latches.
virtual void updateOnPageDirty(bf_idx idx) noexcept=0
Updates the eviction statistics of dirty pages during eviction.
virtual void updateOnPageBlocked(bf_idx idx) noexcept=0
Updates the eviction statistics of pages that cannot be evicted at all.
static constexpr bool _enabledSwizzling
Pointer swizzling used in the buffer pool.
Definition: page_evictioner.hpp:213
virtual void updateOnPointerSwizzling(bf_idx idx) noexcept=0
Updates the eviction statistics of pages when its pointer got swizzled in its parent page...
const bool _logEvictions
Log page evictions.
Definition: page_evictioner.hpp:231