130 _pinned_for_restore =
true;
134 _pinned_for_restore =
false;
242 _rec_lsn = archived_lsn;
243 _persisted_lsn = archived_lsn;
270 _check_recovery = chk;
301 if (_pin_cnt.compare_exchange_strong(old, old + 1)) {
317 if (!_pin_cnt.compare_exchange_strong(old, -1)) {
326 return _pin_cnt >= 0 &&
_used;
330 if (_ref_count < BP_MAX_REFCOUNT) {
336 if (_ref_count < BP_MAX_REFCOUNT) {
359 #endif // __BF_TREE_CB_H lsn_t _next_persisted_lsn
Definition: bf_tree_cb.h:196
uint16_t _ref_count_ex
Reference count incremented only by X-latching.
Definition: bf_tree_cb.h:124
bool prepare_for_eviction()
Definition: bf_tree_cb.h:314
uint16_t get_log_volume() const
Definition: bf_tree_cb.h:249
PageID _pid
Definition: bf_tree_cb.h:108
latch_t & latch() const
Definition: bf_tree_cb.h:354
w_rc_t latch_acquire(latch_mode_t m, int timeout=timeout_t::WAIT_FOREVER)
Acquire the latch in given mode.
Definition: latch.cpp:343
uint8_t _fill13
Definition: bf_tree_cb.h:126
lsn_t _page_lsn
Definition: bf_tree_cb.h:146
lsn_t _persisted_lsn
Definition: bf_tree_cb.h:166
bool is_dirty() const
Definition: bf_tree_cb.h:171
#define w_assert1(x)
Level 1 should not add significant extra time.
Definition: w_base.h:198
Control block in the new buffer pool class.
Definition: bf_tree_cb.h:53
std::atomic< bool > _used
true if this block is actually used
Definition: bf_tree_cb.h:142
void increment_log_volume(uint16_t c)
Definition: bf_tree_cb.h:253
uint32_t _log_volume
Log volume generated on this page (for page_img logrec compression, see xct_logger.h)
Definition: bf_tree_cb.h:248
void set_page_lsn(lsn_t lsn)
Definition: bf_tree_cb.h:151
void reset_ref_count_ex()
Definition: bf_tree_cb.h:341
static const lsn_t null
Definition: lsn.h:371
uint16_t _swizzled_ptr_cnt_hint
Definition: bf_tree_cb.h:264
bool is_pinned_for_restore()
Definition: bf_tree_cb.h:137
void inc_ref_count_ex()
Definition: bf_tree_cb.h:335
void clear_latch()
Definition: bf_tree_cb.h:98
static constexpr int WAIT_IMMEDIATE
Definition: timeout.h:27
std::atomic< int32_t > _pin_cnt
Count of pins on this block. See class comments; protected by ??
Definition: bf_tree_cb.h:111
static const uint16_t BP_MAX_REFCOUNT
Definition: bf_tree_cb.h:71
void notify_write()
Definition: bf_tree_cb.h:218
lsn_t _next_rec_lsn
Definition: bf_tree_cb.h:207
uint32_t PageID
Definition: basics.h:45
void init(PageID pid=0, lsn_t page_lsn=lsn_t::null)
Definition: bf_tree_cb.h:76
Log Sequence Number. See Log Sequence Numbers (LSN).
Definition: lsn.h:243
A short-term hold (exclusive or shared) on a page.
Definition: latch.h:159
void set_check_recovery(bool chk)
Definition: bf_tree_cb.h:269
void inc_ref_count()
Definition: bf_tree_cb.h:329
bool is_in_use() const
Definition: bf_tree_cb.h:325
void mark_persisted_lsn()
Definition: bf_tree_cb.h:201
lsn_t _rec_lsn
Definition: bf_tree_cb.h:191
void pin_for_restore()
Definition: bf_tree_cb.h:129
bf_tree_cb_t & operator=(const bf_tree_cb_t &)
lsn_t get_next_persisted_lsn() const
Definition: bf_tree_cb.h:197
void unpin_for_restore()
Definition: bf_tree_cb.h:133
lsn_t get_next_rec_lsn() const
Definition: bf_tree_cb.h:208
std::atomic< bool > _swizzled
Whether this page is swizzled from the parent.
Definition: bf_tree_cb.h:144
std::atomic< bool > _pinned_for_restore
Definition: bf_tree_cb.h:128
uint16_t _ref_count
Definition: bf_tree_cb.h:121
bool _check_recovery
Definition: bf_tree_cb.h:268
latch_t * latchp() const
Definition: bf_tree_cb.h:350
lsn_t get_persisted_lsn() const
Definition: bf_tree_cb.h:167
bf_tree_cb_t()
Definition: bf_tree_cb.h:73
lsn_t get_page_lsn() const
Definition: bf_tree_cb.h:147
lsn_t get_rec_lsn() const
Definition: bf_tree_cb.h:192
int8_t _fill64
Definition: bf_tree_cb.h:290
latch_t _latch
Definition: bf_tree_cb.h:292
void notify_write_logbased(lsn_t archived_lsn)
This is used by the decoupled (a.k.a log-based) cleaner.
Definition: bf_tree_cb.h:236
void set_log_volume(uint16_t c)
Definition: bf_tree_cb.h:257
int latch_release()
release the latch.
Definition: latch.cpp:381
bool pin()
Definition: bf_tree_cb.h:295
void unpin()
Definition: bf_tree_cb.h:308