Skip to main content

Doublewrite Buffer & Change Buffer

Learn Doublewrite Buffer & Change Buffer (InnoDB Internals, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Introduction The doublewrite buffer protects against torn pages: a 16 KB page write can be interrupted halfway by a crash, leaving a corrupt page. InnoDB first writes pages to a doublewrite area, then to their real location. The change buffer caches modifications to secondary-index pages that are not in memory, merging them later to avoid random reads.

More lessons in InnoDB Internals