![]() |
MySQL 8.0.43
Source Code Documentation
|
We use Flush_observer to track flushing of non-redo logged pages in bulk create index(btr0load.cc).Since we disable redo logging during a index build, we need to make sure that all dirty pages modified by the index build are flushed to disk before any redo logged operations go to the index. More...
#include <buf0flu.h>
Public Member Functions | |
| Flush_observer (space_id_t space_id, trx_t *trx, Alter_stage *stage) noexcept | |
| Constructor. More... | |
| ~Flush_observer () noexcept | |
| Destructor. More... | |
| bool | is_complete (size_t instance_no) |
| Check pages have been flushed and removed from the flush list in a buffer pool instance. More... | |
| void | interrupted () |
| Interrupt observer not to wait. More... | |
| bool | check_interrupted () |
| Check whether trx is interrupted. More... | |
| void | flush () |
| Flush dirty pages. More... | |
| void | notify_flush (buf_pool_t *buf_pool, buf_page_t *bpage) |
| Notify observer of flushing a page. More... | |
| void | notify_remove (buf_pool_t *buf_pool, buf_page_t *bpage) |
| Notify observer of removing a page from flush list. More... | |
Private Types | |
| using | Counter = std::atomic_int |
| using | Counters = std::vector< Counter, ut::allocator< Counter > > |
Private Attributes | |
| space_id_t | m_space_id {} |
| Tablespace ID. More... | |
| trx_t * | m_trx {} |
| Trx instance. More... | |
| Alter_stage * | m_stage {} |
| Performance schema accounting object, used by ALTER TABLE. More... | |
| Counters | m_flushed {} |
| Flush request sent, per buffer pool. More... | |
| Counters | m_removed {} |
| Flush request finished, per buffer pool. More... | |
| Counter | m_n_ref_count {} |
| Number of pages using this instance. More... | |
| bool | m_interrupted {} |
| True if the operation was interrupted. More... | |
We use Flush_observer to track flushing of non-redo logged pages in bulk create index(btr0load.cc).Since we disable redo logging during a index build, we need to make sure that all dirty pages modified by the index build are flushed to disk before any redo logged operations go to the index.
|
private |
|
private |
|
noexcept |
Constructor.
| [in] | space_id | table space id |
| [in] | trx | trx instance |
| [in,out] | stage | PFS progress monitoring instance, it's used by ALTER TABLE. It is passed to log_preflush_pool_modified_pages() for accounting. |
|
noexcept |
Destructor.
| bool Flush_observer::check_interrupted | ( | ) |
Check whether trx is interrupted.
| void Flush_observer::flush | ( | ) |
Flush dirty pages.
|
inline |
Interrupt observer not to wait.
|
inline |
Check pages have been flushed and removed from the flush list in a buffer pool instance.
| [in] | instance_no | buffer pool instance no |
| void Flush_observer::notify_flush | ( | buf_pool_t * | buf_pool, |
| buf_page_t * | bpage | ||
| ) |
Notify observer of flushing a page.
| [in] | buf_pool | buffer pool instance |
| [in] | bpage | buffer page to flush |
| void Flush_observer::notify_remove | ( | buf_pool_t * | buf_pool, |
| buf_page_t * | bpage | ||
| ) |
Notify observer of removing a page from flush list.
| [in] | buf_pool | buffer pool instance |
| [in] | bpage | buffer page flushed |
|
private |
Flush request sent, per buffer pool.
|
private |
True if the operation was interrupted.
|
private |
Number of pages using this instance.
|
private |
Flush request finished, per buffer pool.
|
private |
Tablespace ID.
|
private |
Performance schema accounting object, used by ALTER TABLE.
If not nullptr, then stage->begin_phase_flush() will be called initially, specifying the number of pages to be attempted to be flushed and subsequently, stage->inc() will be called for each page we attempt to flush.
|
private |
Trx instance.