Mysql 内部结构 / Replication | 层次结构
2019獨角獸企業(yè)重金招聘Python工程師標(biāo)準(zhǔn)>>>
19.1?Chapter Organization
We distinguish between two levels of the architecture:?principles, and?rules:
principle
High-level goal that declares how the program shall work, from an external point of view. Principles do not discuss how the code works. An example of a principle is "no row events shall be written to the binlog if binlog_format=statement".
rule
Defines how to implement the principles. Rules can be formulated on a very high level, but they describe implementation (how the code works from the inside) rather than interface (how the program behaves when looking from the outside). An example of a rule is "at ROLLBACK when the transaction cache only contains updates to transactional tables, clear the transaction cache and do not write to the binlog".
In the next section, we list the source code files used by replication and describe what each file contains. The section after describes the replication principles and the following section describes the replication rules. The last section contains very old, obsolete documentation. It will be removed after we have verified that anything useful has been transferred to the main sections.
我們區(qū)分兩個層次結(jié)構(gòu)之間:?原理??和?規(guī)則:
原理
從外部來看,作為高層次的標(biāo)準(zhǔn)聲明該程序應(yīng)是如何工作的。原則不討論該代碼是如何工作的。例如某原理的定義是“如果binlog_format =statement,行格式就不應(yīng)該被寫入二進(jìn)制日志(注意這里的row event指的是binlog_format=row的情況下,binlog里面的event,這個event是binlog二進(jìn)制里面定義的)”。
規(guī)則
定義如何實施的原理。規(guī)則可以在一個非常高的水平上制定,但它們描述的如何實現(xiàn)(從代碼上看內(nèi)如何工作的),而不是接口(程序從外面看時如何運行)。規(guī)則的一個例子是“當(dāng)ROLLBACK時,事務(wù)緩存包含更新事務(wù)表內(nèi)容,會被清除事務(wù)緩存并且不寫入二進(jìn)制日志”。
在下一節(jié)中,我們列出了復(fù)制使用的源代碼文件,并說明每個文件內(nèi)容。節(jié)后介紹復(fù)制原理及以下部分介紹復(fù)制規(guī)則。最后一節(jié)包含了很老的,過時的文檔。經(jīng)過我們驗證了什么有用的東西已經(jīng)轉(zhuǎn)移到主要部分將被刪除。
轉(zhuǎn)載于:https://my.oschina.net/u/778602/blog/716361
總結(jié)
以上是生活随笔為你收集整理的Mysql 内部结构 / Replication | 层次结构的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: MyEclipse将Java项目打包成j
- 下一篇: oracle 修改数据表结构常用sql