首页 > Linux操作系统 > Linux操作系统 > 关于redo writing竞争
If
there is redo to write, LGWR then inspects the latch recovery areas for
the redo copy latches (without taking the latches) to determine whether
there are any incomplete copies into the log buffer. For incomplete
copies above the sync RBA, LGWR just defers the writing of that block
and subsequent log buffer blocks. For incomplete copies below the sync
RBA, LGWR sleeps on a LGWR wait for redo copy wait event, and is posted
when the required copy latches have been released. The time taken by
LGWR to take the redo writing and redo allocation latches and to wait
for the redo copy latches is accumulated in the redo writer latching
time statistic.
(Prior to release 8i, foreground processes held the redo copy latches more briefly because they did not retain them for the application of the change vectors. Therefore, LGWR would instead attempt to assure itself that there were no ongoing copies into the log buffer by taking all the redo copy latches.)
After each redo write has completed, LGWR takes the redo allocation latch again in order to update the SGA variable containing the base disk block for the log buffer. This effectively frees the log buffer blocks that have just been written, so that they may be reused.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/22664653/viewspace-689694/ ,如需转载,请注明出处,否则将追究法律责任。