>데이터 베이스 >MySQL 튜토리얼 >对checkpointnotcompleted的理解

对checkpointnotcompleted的理解

WBOY
WBOY원래의
2016-06-07 15:59:421192검색

假设数据库存在两个日志组log1和log2,首先,--log1--log2--log1,此时(log2切换到log1)触发checkpoint,该checkpoint will flush dirty block to datafile,从而触发DBWn书写dirty buffer,等到log1覆盖的dirty block全部被写入datafile后才能使用log1(

假设数据库存在两个日志组log1和log2,首先,-->log1-->log2-->log1,此时(log2切换到log1)触发checkpoint,该checkpoint will flush dirty block to datafile,从而触发DBWn书写dirty buffer,等到log1覆盖的dirty block全部被写入datafile后才能使用log1(循环使用),如果DBWn写入过慢,LGWR必须等待DBWn完成,则这时会出现“checkpoint not completed!”

别人的回答是

log1-> log2, trigger checkpoint 1
after log2 is full,
log2-> log1, trigger checkpoint 2
but if checkpoint 1 is still not finished, then LGWR must wait. This is "logfile switch (checkpoint incompleted)" event.

我的理解是

1.检查点完成,才能顺利切换。

2.checkpoint1阻塞了log2->log1的切换。

3.没有可用的redo日志,会阻塞数据正常使用,这时数据库是短暂hang住的。(原因如下)

不知道对不对,请高人指正~

Before a change is done in the buffer cache a change vector (file, block, row, value) about this change is written to the redo buffer. First the change of the undo block to be made soon is tracked (L). Then the change is done in the buffer cache (M). Then the change of the table block to be made soon is tracked (N). Then the insert to the table block is done in the buffer cache (O). All actions up to now where done by the server process (P). Finally it returns the control to the client process (Q).

redo无法试用,导致事务不能正常进行。

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.